| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 148441
|
| |
|
|
|
|
|
|
|
|
| |
values and non-type template arguments of integral and enumeration types.
This change causes some legal C++98 code to no longer compile in C++11 mode, by
enforcing the C++11 rule that narrowing integral conversions are not permitted
in the final implicit conversion sequence for the above cases.
llvm-svn: 148439
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Includes tests highlighting the cases where accuracy has improved
(there is one call that does no filtering beyond selecting the set
of allowed keywords, and one call that only triggers for ObjC code
for which a test by someone who knows ObjC would be welcome). Also
fixes a small typo in one of the suggestion messages, and drops a
malformed "expected-note" for a suggestion that did not occur even
when the malformed note was committed as r145930.
llvm-svn: 148420
|
| |
|
|
|
|
|
| |
in favor of usage of api's intended for.
// rdar://8290002
llvm-svn: 148404
|
| |
|
|
|
|
|
|
| |
L'x' is actually wchar_t
support C11 u and U char literals
llvm-svn: 148390
|
| |
|
|
|
|
|
|
|
|
|
|
| |
No new unit tests yet as there is no behavioral change
(except for slightly more specific filtering in
Sema::ActOnStartOfLambdaDefinition). Tests will be added
as the code paths are traced in greater depth to determine
how to improve the results--there are at least one or two
known bugs that require those improvements. This commit
lays the groundwork for those changes.
llvm-svn: 148382
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
for it to be used in converted constant expression checking, and fix a couple
of issues:
- Conversion operators implicitly invoked prior to the narrowing conversion
were not being correctly handled when determining whether a constant value
was narrowed.
- For conversions from floating-point to integral types, the diagnostic text
incorrectly always claimed that the source expression was not a constant
expression.
llvm-svn: 148381
|
| |
|
|
|
|
| |
referencing a class field from outside an instance method.
llvm-svn: 148376
|
| |
|
|
|
|
| |
inspection.
llvm-svn: 148373
|
| |
|
|
|
|
| |
PotentiallyPotentiallyEvaluated contexts. In preparation for making sizeof() PotentiallyPotentiallyEvaluated.
llvm-svn: 148367
|
| |
|
|
|
|
|
|
| |
rely on property's type for its life-time to avoid
bogus warning with -Warc-unsafe-retained-assign.
// rdar://10694932
llvm-svn: 148355
|
| |
|
|
| |
llvm-svn: 148354
|
| |
|
|
|
|
|
|
| |
support. This means you can now write:
for (int i : {1, 4, 512, 23, 251}) {}
llvm-svn: 148353
|
| |
|
|
|
|
| |
initializer lists.
llvm-svn: 148352
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are 5 functions of this name in Sema, and 6 more static helpers in
SemaTemplateDeduction.cpp. The Sema functions have jobs like "deduce for
function call", "deduce for taking the address", etc. The static helpers
have jobs like "deduce by comparing two types", "deduce by comparing two
lists of types", "deduce by comparing two template arguments", etc.
The fact that they all are called the same and only differ in two of their
6 or more arguments makes the code using them very hard to read.
Here I rename the one function that concerns me most at the moment, but
as a matter of cleanup, the others will eventually be renamed as well.
llvm-svn: 148351
|
| |
|
|
| |
llvm-svn: 148350
|
| |
|
|
|
|
| |
This does not yet support CodeGen.
llvm-svn: 148349
|
| |
|
|
|
|
| |
operations.
llvm-svn: 148348
|
| |
|
|
| |
llvm-svn: 148335
|
| |
|
|
|
|
|
| |
PR 10274: format function attribute with the NSString archetype yields no compiler warnings
PR 10275: format function attribute isn't checked in Objective-C methods
llvm-svn: 148324
|
| |
|
|
|
|
|
|
| |
objc class was not being exported to parent decl
context resulting in bogus mismatch warning later on.
// rdar://10655530
llvm-svn: 148320
|
| |
|
|
|
|
|
| |
moving it from a "special type" to a predefined declaration, as we do
for id, Class, and SEL.
llvm-svn: 148313
|
| |
|
|
| |
llvm-svn: 148296
|
| |
|
|
| |
llvm-svn: 148294
|
| |
|
|
|
|
| |
appropriate or when GCC requires it)
llvm-svn: 148292
|
| |
|
|
|
|
| |
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
|
| |
|
|
|
|
|
|
| |
does not depend on Sema, it accepts an ASTContext and a Preprocessor.
Step towards making clang_getCursorCompletionString not depend on Sema.
llvm-svn: 148278
|
| |
|
|
|
|
|
|
| |
on an ASTContext.
This is a step towards making clang_getCursorCompletionString not depend on Sema.
llvm-svn: 148277
|
| |
|
|
| |
llvm-svn: 148276
|
| |
|
|
|
|
|
|
| |
PotentiallyPotentiallyEvaluated contexts so that we model it in a sane way in most cases, and give up for the edge case which hopefully doesn't matter too much.
In preparation for correctly treating sizeof() as a PotentiallyPotentiallyEvaluated context.
llvm-svn: 148271
|
| |
|
|
|
|
|
|
|
|
| |
for FunctionDecl::getMemoryFunctionKind().
This is a follow up on the Chris's review for r148142: We don't want to
pollute FunctionDecl with an extra enum. (To make this work, added
memcmp and family to the library builtins.)
llvm-svn: 148267
|
| |
|
|
| |
llvm-svn: 148254
|
| |
|
|
|
|
| |
declaration which is used is marked as used.
llvm-svn: 148253
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.
Still to do:
- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases
llvm-svn: 148242
|
| |
|
|
| |
llvm-svn: 148229
|
| |
|
|
|
|
|
|
| |
not integer constant expressions. In passing, fix the 'folding is an extension'
diagnostic to not claim we're accepting the code, since that's not true in
-pedantic-errors mode, and add this diagnostic to -Wgnu.
llvm-svn: 148209
|
| |
|
|
|
|
| |
Shrinks OverloadCandidate from 208 to 168 bytes.
llvm-svn: 148204
|
| |
|
|
|
|
| |
fragile.
llvm-svn: 148200
|
| |
|
|
|
|
| |
conversion sequences so we don't get double frees when the vector reallocates.
llvm-svn: 148198
|
| |
|
|
| |
llvm-svn: 148197
|
| |
|
|
|
|
|
|
|
|
|
|
| |
we have a redeclarable type, and only use the new virtual versions
(getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
that type information. This keeps us from penalizing users with strict
type information (and is the moral equivalent of a "final" method).
Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
throughout.
llvm-svn: 148187
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid malloc thrashing give OverloadCandidateSet an inline capacity for conversion sequences.
We use the fact that OverloadCandidates never outlive the OverloadCandidateSet and have a fixed
amount of conversion sequences.
This eliminates the oversized SmallVector from OverloadCandidate shrinking it from 752 to 208 bytes.
On the test case from the "Why is CLANG++ so freaking slow" thread on llvmdev this avoids one gig
of vector reallocation (including memcpy) which translates into 5-10% speedup on Lion/x86_64.
Overload candidate computation is still the biggest malloc contributor when compiling templated
c++ code.
llvm-svn: 148186
|
| |
|
|
|
|
|
| |
Replace push_back with addCandidate which will let us make use of the fixed size of
the conversion sequence vector soon.
llvm-svn: 148185
|
| |
|
|
|
|
|
|
| |
virtual functions that provide previous/most recent redeclaration
information for any declaration. Use this to eliminate the redundant,
less efficient getPreviousDecl() functions.
llvm-svn: 148184
|
| |
|
|
|
|
|
|
| |
don't set isUsed for local variables which are referenced in unevaluated contexts. Make other code use isReferenced() (which basically indicates that a declaration isn't dead) where appropriate.
I was forced to change test/SemaCXX/linkage.cpp because we aren't actually modeling extern "C" in the AST the way that testcase expects; we were not printing a warning only because we skipped the relevant check. Someone who actually understands the semantics here should fix that.
llvm-svn: 148158
|
| |
|
|
|
|
|
|
| |
The change to SemaTemplateVariadic.cpp improves the typo correction
results in certain situations, while the change to SemaTemplate.cpp
does not change existing behavior.
llvm-svn: 148155
|
| |
|
|
|
|
|
| |
multiple name lookup results in C/Objective-C. Fixes a regression a
caused in r147533, found by Enea Zaffanella!
llvm-svn: 148154
|
| |
|
|
|
|
|
| |
memcmp, strncmp,..) out of Sema and into FunctionDecl so that the logic
could be reused in the analyzer.
llvm-svn: 148142
|
| |
|
|
|
|
|
|
|
| |
improving the typo correction results in certain situations.
This is also the first typo correction callback conversion to affect
an existing unit test. :)
llvm-svn: 148140
|
| |
|
|
| |
llvm-svn: 148135
|