| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
base classes.
llvm-svn: 148094
|
| |
|
|
|
|
| |
report on cfe-dev.
llvm-svn: 148090
|
| |
|
|
|
|
| |
function. In particular, this restores the cool error recovery for the example from http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html , which regressed a few months back.
llvm-svn: 148089
|
| |
|
|
|
|
| |
incomplete return type.
llvm-svn: 148088
|
| |
|
|
|
|
|
| |
objects, and add a basic CorrectionCandidateCallback template class
to simplify the fixups.
llvm-svn: 148085
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- If the declarator is at the start of a line, and the previous line contained
another declarator and ended with a comma, then that comma was probably a
typo for a semicolon:
int n = 0, m = 1, l = 2, // k = 5;
myImportantFunctionCall(); // oops!
- If removing the parentheses would correctly initialize the object, then
produce a note suggesting that fix.
- Otherwise, if there is a simple initializer we can suggest which performs
value-initialization, then provide a note suggesting a correction to that
initializer.
Sema::Declarator now tracks the location of the comma prior to the declarator in
the declaration, if there is one, to facilitate providing the note. The code to
determine an appropriate initializer from the -Wuninitialized warning has been
factored out to allow use in both that and -Wvexing-parse.
llvm-svn: 148072
|
| |
|
|
|
|
| |
improvng the typo correction results in certain situations.
llvm-svn: 148052
|
| |
|
|
|
|
| |
list of protools. // rdar://10669694
llvm-svn: 148051
|
| |
|
|
|
|
|
| |
And once again improve the typo correction results in certain
situations just by moving the existing checks on the correction.
llvm-svn: 148037
|
| |
|
|
|
|
|
|
| |
expression for an Objective-C object or pointer type, so that we don't
attempt to treat the member name as a template. Fixes
<rdar://problem/10672501>.
llvm-svn: 148028
|
| |
|
|
|
|
|
|
|
|
| |
was constructed, e.g. for a property access.
This allows the selector identifier locations machinery for ObjCMessageExpr
to function correctly, in that there are not real locations to handle/report for
such a message.
llvm-svn: 148013
|
| |
|
|
| |
llvm-svn: 147984
|
| |
|
|
|
|
|
| |
in class extensions and categories by recent refactoring
of objc class ASTs. // rdar://1066654
llvm-svn: 147982
|
| |
|
|
|
|
| |
variably-modified type.
llvm-svn: 147973
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
are still added if the cached correction fails validation.
Also fix a copy-and-paste error in a comment from my previous commit.
Finally, add an example of the benefit the typo correction callback adds
to TryNamespaceTypoCorrection--which happens to also tickle the above
caching problem, as the only way a non-namespace Decl would be added to
the possible corrections is if it was cached as the correction for a
previous instance of the same typo where the typo was corrected to a
non-namespace via a different code path.
llvm-svn: 147968
|
| |
|
|
| |
llvm-svn: 147963
|
| |
|
|
|
|
|
|
|
| |
Also includes two examples of the callback: a wrapper/replacement for
the CorrectTypoContext enum, and a conversion of the two calls to
CorrectTypo in SemaDeclCXX.cpp (one of which provides verifiable
improvement to the typo correction, as demonstrated in the added test).
llvm-svn: 147962
|
| |
|
|
|
|
|
| |
life-time to that of its backing 'ivar's lifetime.
// rdar://10558871
llvm-svn: 147956
|
| |
|
|
|
|
|
| |
downgrade the default-error warning to an ExtWarn in
C90/99. <rdar://problem/10668057>
llvm-svn: 147925
|
| |
|
|
|
|
| |
shared between lambda expressions and block literals.
llvm-svn: 147917
|