Commit Graph

25253 Commits

Author SHA1 Message Date
Gabor Greif 468aa3b20c check whether sema issues a redefinition error
llvm-svn: 112347
2010-08-28 02:00:22 +00:00
Gabor Greif 34ecff269e perform cheap test first
llvm-svn: 112346
2010-08-28 01:58:12 +00:00
Nick Lewycky 02d13d1356 Ignore this flag too, Clang doesn't seem to use random numbers internally.
llvm-svn: 112342
2010-08-28 01:01:21 +00:00
Gabor Greif 73ddbc51ab note to self: save before committing; add PR
llvm-svn: 112339
2010-08-28 00:48:36 +00:00
Gabor Greif 1d28820888 fix test by applying it in top namespace: PR8007 only showed up this way
llvm-svn: 112338
2010-08-28 00:45:56 +00:00
Ted Kremenek d7478d6010 Update test case, with comment to later investigate the correct behavior. Now the behavior is at least consistent.
llvm-svn: 112335
2010-08-28 00:19:12 +00:00
Ted Kremenek 82bfc86792 Explicitly handle CXXExprWithTemporaries during CFG construction by just visiting the subexpression. While we don't do anything intelligent right now, this obviates a bogus -Wunreahable-code warning reported in PR 6130.
llvm-svn: 112334
2010-08-28 00:19:02 +00:00
Gabor Greif b6aba3ef28 fix PR8007
reordering and redefinition issues still may linger,
I plan to nail them next

llvm-svn: 112333
2010-08-28 00:16:06 +00:00
Douglas Gregor eaeeca9afe Basic code completion support for the base and member initializers in
a constructor.

llvm-svn: 112330
2010-08-28 00:00:50 +00:00
Gabor Greif a56984c72f reproduction recipe for PR8007, expected to fail for now, review welcome
llvm-svn: 112326
2010-08-27 23:39:49 +00:00
Sebastian Redl 6766794c0b Parser support for inline namespaces
llvm-svn: 112320
2010-08-27 23:12:46 +00:00
Sebastian Redl 5bfe034ecc Comment and move another ASTReader member.
llvm-svn: 112319
2010-08-27 23:12:39 +00:00
Sebastian Redl cc6458890d Update comment after Chandler's change.
llvm-svn: 112318
2010-08-27 23:12:36 +00:00
Douglas Gregor fcee9460c6 Miscellaneous found by inspection with John and Sebastian
llvm-svn: 112315
2010-08-27 22:55:10 +00:00
Tom Care 71cc9d886a Added checking of (x == x) and (x != x) to IdempotentOperationChecker and updated test cases flagged by it.
llvm-svn: 112313
2010-08-27 22:50:47 +00:00
Tom Care 98e679508d Enabled relaxed LiveVariables analysis in the path-sensitive engine to increase the coverage of bugs. Primarily affects IdempotentOperationChecker.
- Migrated a temporarily separated test back to its original file (bug has been fixed, null-deref-ps-temp.c -> null-deref-ps.c)
- Changed SymbolManager to use relaxed LiveVariables
- Updated several test cases that the IdempotentOperationChecker class now flags
- Added test case to test relaxed LiveVariables use by the IdempotentOperationChecker

llvm-svn: 112312
2010-08-27 22:46:32 +00:00
Tom Care f7b7067c4d Remove an assertion in UnreachableCodeChecker that can be triggered by bugs in other checkers.
llvm-svn: 112310
2010-08-27 22:37:31 +00:00
Tom Care c29c91aaaa Fix bug in IdempotentOperationChecker where an assumption would not get updated properly.
llvm-svn: 112309
2010-08-27 22:35:28 +00:00
Chris Lattner 1ba644575d handle :: in selectors in objc++ mode, rdar://8366474
llvm-svn: 112307
2010-08-27 22:32:41 +00:00
Tom Care e5aa30c722 Add alternate version of LiveVariables analysis that does not kill liveness at assignments. This 'relaxed' liveness is useful in path sensitive analysis for situations where the resulting extended liveness allows us to find some bugs.
- Added killAtAssign flag to LiveVariables
- Added relaxed LiveVariables to AnalysisContext with an accessor

llvm-svn: 112306
2010-08-27 22:30:10 +00:00
Ted Kremenek 378e93c210 Add source file I meant to include in my previous commit.
llvm-svn: 112303
2010-08-27 21:57:20 +00:00
Douglas Gregor 7bddb3cac3 Improve wording of diagnostic complaining about a non-void* pointer as the first parameter of operator delete
llvm-svn: 112298
2010-08-27 21:39:15 +00:00
Ted Kremenek ae9e221513 Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.
Implements <rdar://problem/8274883>.

llvm-svn: 112296
2010-08-27 21:34:58 +00:00
Ted Kremenek 2c2c5f3789 Fix copy-paste in doxygen comment.
llvm-svn: 112295
2010-08-27 21:34:51 +00:00
Douglas Gregor ac322ec9b9 Implement the "call super" code completion for C++. If the virtual
member function you're typing in overrides another virtual function,
this fills in a (qualified!) call to that virtual function to make
such delegation easy.

llvm-svn: 112294
2010-08-27 21:18:54 +00:00
Douglas Gregor 9704c75b1f Teach clang_codeComplete to always sort its code-completion results
llvm-svn: 112292
2010-08-27 21:13:41 +00:00
Chris Lattner 212a492063 fix incorrect MM_HINT_ definitions, PR8011
llvm-svn: 112283
2010-08-27 20:10:06 +00:00
John McCall 1ababa63de Continue to instantiate sub-statements in a CompoundStmt as long as
we don't see a DeclStmt (failure to instantiate which generally causes
panic).

llvm-svn: 112282
2010-08-27 19:56:05 +00:00
Devang Patel 96b7f55a03 Debug info for friends!
Patch originally by Alexander Herz.

llvm-svn: 112275
2010-08-27 17:47:47 +00:00
Douglas Gregor 28c7843ec4 Suggest "const" and "volatile" code completions after a function
declarator, the very definition of "low-hanging fruit".

llvm-svn: 112274
2010-08-27 17:35:51 +00:00
Bob Wilson 7b0d032d0c Add the new alignment arguments for NEON load/store intrinsics, based on the
types of the pointer address expressions used with those intrinsics.

llvm-svn: 112272
2010-08-27 17:14:29 +00:00
Dan Gohman 8b4c320778 createMainFileID doesn't need its IncludePos argument, since
the main file isn't an included file, and the IncludePos is
always SourceLocation().

llvm-svn: 112269
2010-08-27 15:44:11 +00:00
Douglas Gregor c2cb2e23bc When code-completing inside an Objective-C method, give a slight
priority boost to methods with the same selector. 

llvm-svn: 112268
2010-08-27 15:29:55 +00:00
Douglas Gregor 6fc0413e59 Add a super-cool code completion for send-to-super. When we're typing
a message send to "super" from a method that appears to be meant to
override a superclass method (same kind, same selector, same argument
types), provide a "super" completion that fills in the selector along
with forwarding the method's arguments (as placeholders).

llvm-svn: 112263
2010-08-27 15:10:57 +00:00
Douglas Gregor f0b38ebb53 Fix CMake dependencies, from Fernando Pelliccioni!
llvm-svn: 112261
2010-08-27 14:18:05 +00:00
John McCall 8d08b9b408 Propagate whether an id-expression is the immediate argument of
an '&' expression from the second caller of ActOnIdExpression.

Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.

Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a        
permitted form of use for member functions.

Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.

llvm-svn: 112258
2010-08-27 09:08:28 +00:00
Douglas Gregor f5bae22db7 Don't recurse twice when we can recurse once
llvm-svn: 112246
2010-08-27 00:11:28 +00:00
John McCall faf5fb4b78 One who seeks knowledge learns something new every day.
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.

llvm-svn: 112244
2010-08-26 23:41:50 +00:00
Devang Patel b0958c7699 test case for r112238.
llvm-svn: 112239
2010-08-26 22:54:33 +00:00
Ted Kremenek 036223bdcf Fix horrible GRExprEngine bug where switch statements with no 'case:' statements would cause the path to get prematurely aborted. Fixes <rdar://problem/8360854>.
llvm-svn: 112233
2010-08-26 22:19:33 +00:00
Ted Kremenek c8bd967430 Remove redundant cast<...>.
llvm-svn: 112229
2010-08-26 22:04:01 +00:00
Dan Gohman ce46f02a32 Fix a typo.
llvm-svn: 112219
2010-08-26 21:27:06 +00:00
Chris Lattner d7e54804ee improve comments.
llvm-svn: 112214
2010-08-26 20:08:43 +00:00
Chris Lattner 07b71c4eb1 add radar #
llvm-svn: 112212
2010-08-26 20:05:48 +00:00
Chris Lattner d774ae9ed1 fix 2xi16 to pass as i32 instead of <2 x i16>. The former passes in
memory (as required) the later now passes in an xmm register.  This
fixes gcc.dg/compat/vector_1 on x86-32.

llvm-svn: 112211
2010-08-26 20:05:13 +00:00
Fariborz Jahanian 4fcc97f2f9 clang.xcodeproj updated.
llvm-svn: 112209
2010-08-26 19:58:26 +00:00
Chris Lattner 69e683fb35 vector of long and ulong are also classified as INTEGER in x86-64 abi,
this fixes rdar://8358475 a failure of the gcc.dg/compat/vector_1 abi
test.

llvm-svn: 112205
2010-08-26 18:13:50 +00:00
Chris Lattner 46830f2fd6 1 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,
this fixes a miscompilation on the included testcase, rdar://8359248

llvm-svn: 112201
2010-08-26 18:03:20 +00:00
John McCall c162d1bbe4 ...I forgot to check my new test after adding it, and lo, there's slightly different
behavior in C than in C++ (which is what the original test case was).

llvm-svn: 112199
2010-08-26 17:42:30 +00:00
John McCall a3707cc7e2 Make sure we clear TypeSpecOwned when setting TypeSpecType to something when
it might previously have been a tag TST.

llvm-svn: 112196
2010-08-26 17:22:34 +00:00