| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
restrictions.
llvm-svn: 174601
|
|
|
|
|
|
| |
module import occurred.
llvm-svn: 174191
|
|
|
|
|
|
| |
defined. Fixes PR14993!
llvm-svn: 174158
|
|
|
|
|
|
| |
Also support alignas(0), which C++11 and C11 require us to ignore.
llvm-svn: 174157
|
|
|
|
|
|
|
| |
filter the elements before emitting them into a PCH. No user-visible
functionality change, except that PCH files may be smaller?
llvm-svn: 174034
|
|
|
|
| |
llvm-svn: 174032
|
|
|
|
|
|
| |
a test case.
llvm-svn: 173963
|
|
|
|
|
|
| |
an attribute for consistency with our other noreturn mechanisms.
llvm-svn: 173898
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the member has an initializer, assume it was probably intended to be static
and suggest/recover with that.
If the member doesn't have an initializer, assume it was probably intended to
be const instead of constexpr and suggest that.
(if the attempt to apply these changes fails, don't make any suggestion &
produce the same diagnostic experience as before. The only case where this can
come up that I know of is with a mutable constexpr with an initializer, since
mutable is incompatible with static (but it's already incompatible with
const anyway))
llvm-svn: 173873
|
|
|
|
| |
llvm-svn: 173841
|
|
|
|
|
|
|
| |
Fix to change r173414 that lead to Clang changing const to constexpr even under
-Wno-static-float-init.
llvm-svn: 173835
|
|
|
|
|
|
|
|
|
|
|
| |
TopLevelDeclInObjCContainer bit.
Fixes accurately getting a cursor inside an objc container containing a struct definition,
from a PCH/preamble file.
rdar://12584613
llvm-svn: 173811
|
|
|
|
|
|
| |
Also refactor the surrounding code a little.
llvm-svn: 173791
|
|
|
|
|
|
| |
forms of 'main' which we accept as an extension.
llvm-svn: 173758
|
|
|
|
|
|
|
|
|
|
| |
This required plumbing through a new flag to determine whether a ParmVarDecl is
actually a parameter of a function declaration (as opposed to a function
typedef etc, where the attribute is prohibited). Weirdly, this attribute (just
like [[noreturn]]) cannot be applied to a function type, just to a function
declaration (and its parameters).
llvm-svn: 173726
|
|
|
|
|
|
| |
error. Jordan is right.
llvm-svn: 173713
|
|
|
|
|
|
| |
<rdar://problem/13098104>.
llvm-svn: 173708
|
|
|
|
|
|
|
| |
permitted in standard C++, despite being silently accepted by many (all?) major
C++ implementations.
llvm-svn: 173643
|
|
|
|
|
|
|
|
|
|
|
| |
Title: [PR9027] volatile struct bug: member is not loaded at -O;
This is caused by last flag passed to @llvm.memcpy being false,
not honoring that aggregate has at least one 'volatile' data member
(even though aggregate itself has not been qualified as 'volatile'.
As a result, optimization optimizes away the memcpy altogether.
Patch review by John MaCall (I still need to fix up a test though).
llvm-svn: 173535
|
|
|
|
|
|
|
|
| |
never key functions. We did not implement that rule for the
iOS ABI, which was driven by what was implemented in gcc-4.2.
However, implement it now for other ARM-based platforms.
llvm-svn: 173515
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and split it out of -Wgnu into its own warning flag.
* In C++11, this is now a hard error (GCC has no extension here in C++11 mode).
The error can be disabled with -Wno-static-float-init, and has a fixit to
add 'constexpr'.
* In C++98, this is still an ExtWarn, but is now controlled by
-Wstatic-float-init as well as -Wgnu.
llvm-svn: 173414
|
|
|
|
|
|
| |
commented on and approved by Richard Smith.
llvm-svn: 173377
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GNU, C++11, MS Declspec) instead of hardcoded GNU syntax.
Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td.
This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute.
When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and
name, then passed to Attr that will use the index to print itself.
Thanks to Richard Smith for the idea and review.
llvm-svn: 173358
|
|
|
|
|
|
|
|
| |
operations (as opposed to storage only half/fp16).
Also add some semantic checks for OpenCL half types.
llvm-svn: 173254
|
|
|
|
|
|
| |
add tests for fixits removing static and inline from main
llvm-svn: 173024
|
|
|
|
|
|
| |
OpenCL restrictions (OpenCL 1.2 spec 6.9)
llvm-svn: 172973
|
|
|
|
| |
llvm-svn: 172888
|
|
|
|
| |
llvm-svn: 172881
|
|
|
|
|
|
|
|
| |
own initialization."
It broke, at least, linux, msvc and mingw bots.
llvm-svn: 172879
|
|
|
|
|
|
|
|
|
| |
The warning is still under -Wuninitialized (although technically this
is defined behavior), but under a subgroup -Wstatic-self-init.
This addresses PR 10265.
llvm-svn: 172878
|
|
|
|
| |
llvm-svn: 172761
|
|
|
|
|
|
| |
not supported.
llvm-svn: 172732
|
|
|
|
|
|
|
|
| |
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their
semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as
affecting the function type, whereas [[noreturn]] does not).
llvm-svn: 172691
|
|
|
|
| |
llvm-svn: 172684
|
|
|
|
| |
llvm-svn: 172678
|
|
|
|
|
|
|
|
| |
This fixes pr14946. The problem was that the linkage computation was done too
early, so things like "extern int a;" would be given external linkage, even if
a previous declaration was static.
llvm-svn: 172667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
consider (sub)module visibility.
The bulk of this change replaces myriad hand-rolled loops over the
linked list of Objective-C categories/extensions attached to an
interface declaration with loops using one of the four new category
iterator kinds:
visible_categories_iterator: Iterates over all visible categories
and extensions, hiding any that have their "hidden" bit set. This is
by far the most commonly used iterator.
known_categories_iterator: Iterates over all categories and
extensions, ignoring the "hidden" bit. This tends to be used for
redeclaration-like traversals.
visible_extensions_iterator: Iterates over all visible extensions,
hiding any that have their "hidden" bit set.
known_extensions_iterator: Iterates over all extensions, whether
they are visible to normal name lookup or not.
The effect of this change is that any uses of the visible_ iterators
will respect module-import visibility. See the new tests for examples.
Note that the old accessors for categories and extensions are gone;
there are *Raw() forms for some of them, for those (few) areas of the
compiler that have to manipulate the linked list of categories
directly. This is generally discouraged.
Part two of <rdar://problem/10634711>.
llvm-svn: 172665
|
|
|
|
|
|
|
|
| |
overriding and overridden method, allow the overridden method to have
a narrower contract (introduced earlier, deprecated/obsoleted later)
than the overriding method. Fixes <rdar://problem/12992023>.
llvm-svn: 172567
|
|
|
|
|
|
|
|
| |
ActOnFinishFullExpr that some of its checks only apply to discarded-value
expressions. This adds missing checks for unexpanded variadic template
parameter packs to a handful of constructs.
llvm-svn: 172485
|
|
|
|
|
|
| |
we know whether it is static.
llvm-svn: 172376
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The testcase in pr14929 shows that this is extremely hard to do. If we choose
to apply the attribute, that causes the visibility of some decls to change and
that can happen really late (during codegen).
Current gcc warns and ignores the attribute in this testcase with a warning.
This suggest that the correct solution is to find a point in the compilation
where we can compute the visibility and
* assert it was never computed before
* reject any attempts to compute it again in the future (with warnings).
llvm-svn: 172305
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which a particular declaration resides. Use this information to
customize the "definition of 'blah' must be imported from another
module" diagnostic with the module the user actually has to
import. Additionally, recover by importing that module, so we don't
complain about other names in that module.
Still TODO: coming up with decent Fix-Its for these cases, and expand
this recovery approach for other name lookup failures.
llvm-svn: 172290
|
|
|
|
|
|
|
| |
Before we were only checking if the new declaration itself was marked extern
C. Fixes prpr14766.
llvm-svn: 172243
|
|
|
|
|
|
| |
external declarations with C language linkage.
llvm-svn: 172150
|
|
|
|
|
|
|
|
|
|
| |
(because they are part of some module) but have not been made visible
(because they are in a submodule that wasn't imported), filter out
those declarations unless both the old declaration and the new
declaration have external linkage. When one or both has internal
linkage, there should be no conflict unless both are imported.
llvm-svn: 171925
|
|
|
|
| |
llvm-svn: 171902
|
|
|
|
| |
llvm-svn: 171894
|
|
|
|
|
|
|
| |
The availability implies default visibility, so it can change the computed
visibility.
llvm-svn: 171840
|
|
|
|
|
|
|
|
| |
<objc/Protocol.h>. Caused by my recent changes for
various builtin declarations of objc_msgSendSuper
variety. // rdar://12489098
llvm-svn: 171638
|