summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* If we don't have a complete type for the array type yet either thenEric Christopher2012-08-071-1/+4
| | | | | | | | just let the alignment be zero. PR13531 llvm-svn: 161379
* [ms-inline asm] Stmt destructors are never called, so allocate the AsmToks usingChad Rosier2012-08-074-9/+13
| | | | | | the ASTContext BumpPtr. Also use the preferred llvm::ArrayRef interface. llvm-svn: 161373
* Remove some unintended changes from my last patch.Eric Christopher2012-08-071-3/+2
| | | | llvm-svn: 161369
* Make sure when we get the replacement type for a template argumentEric Christopher2012-08-071-5/+14
| | | | | | | | that we attach the lost qualifiers. Fixes rdar://11882155 llvm-svn: 161368
* Handle null suffixes in GetTemporaryPath (PCH files don't have suffixes).Ted Kremenek2012-08-071-1/+2
| | | | llvm-svn: 161367
* objective-c: Implement gcc's -Wdirect-ivar-access option.Fariborz Jahanian2012-08-062-1/+6
| | | | | | // rdar://6505197 llvm-svn: 161362
* Comment parsing: fix crash on \tparam followed immediately by another blockDmitri Gribenko2012-08-061-1/+4
| | | | | | command, for example: \tparam\brief. llvm-svn: 161361
* [analyzer] Dynamic type info - propagate through implicit casts.Anna Zaks2012-08-061-2/+64
| | | | | | | | I currently have a bit of redundancy with the cast kind switch statement inside the ImplicitCast callback, but I might be adding more casts going forward. llvm-svn: 161358
* [analyzer] Add a checker to manage dynamic type propagation.Anna Zaks2012-08-066-10/+127
| | | | | | | | | | | | Instead of sprinkling dynamic type info propagation throughout ExprEngine, the added checker would add the more precise type information on known APIs (Ex: ObjC alloc, new) and propagate the type info in other cases (ex: ObjC init method, casts (the second is not implemented yet)). Add handling of ObjC alloc, new and init to the checker. llvm-svn: 161357
* Refactor checks for unevaluated contexts into a common utility function.David Blaikie2012-08-063-6/+5
| | | | | | | | | The one caller that's surrounded by nearby code manipulating the underlying evaluation context list is left unmodified for readability. Review by Sean Silva and Richard Smith. llvm-svn: 161355
* Comment AST: DeclInfo: collapse a bunch of boolean flags into an enum.Dmitri Gribenko2012-08-062-16/+11
| | | | llvm-svn: 161352
* [analyzer] Improve arrow locations for PseudoObjectExprs.Jordan Rose2012-08-061-3/+10
| | | | llvm-svn: 161350
* [analyzer] Ignore OS X 10.8's annotations for NSMakeCollectable.Jordan Rose2012-08-061-1/+6
| | | | | | | | | | The frameworks correctly use the 'cf_consumed' and 'ns_returns_retained' attributes for NSMakeCollectable, but we can model the behavior under garbage collection more precisely than that. No functionality change. llvm-svn: 161349
* For global record types, the self reference checker was called twice, resultingRichard Trieu2012-08-061-1/+4
| | | | | | | in duplicate -Wuninitialized warnings. Change so that only the check in TryConstructorInitialization() will be used and a single warning be emitted. llvm-svn: 161345
* [ms-inline asm] Pass Tokens to Sema and store them in the AST. No functionalChad Rosier2012-08-064-10/+14
| | | | | | change intended. No test case as there's no real way to test at this time. llvm-svn: 161342
* Comment parser and sema: remove useless return valuesDmitri Gribenko2012-08-062-101/+93
| | | | llvm-svn: 161331
* Comment diagnostics: warn on duplicate \brief and \return commands.Dmitri Gribenko2012-08-061-3/+40
| | | | | | | | | | Doxygen manual claims that multiple \brief or \returns commands will be merged together, but actual behavior is different (second \brief command becomes a part of a discussion, second \returns becomes a "Returns: blah" paragraph on its own). Anyway, it seems to be a bad idea to use multiple \brief or \returns commands in a single command. llvm-svn: 161325
* Comment diagnostics: \return in void function: specialize diagnostic text forDmitri Gribenko2012-08-062-1/+6
| | | | | | ObjC methods. llvm-svn: 161324
* PR13529: Don't crash if the driver sees an unused input file when running asRichard Smith2012-08-061-4/+13
| | | | | | | | | | 'clang-cpp'. For now, the test uses "REQUIRES: shell" to determine if the host system supports "ln -s", which it uses to create a 'clang-cpp' symlink. This is a bit hacky and should likely be directly supported by lit.cfg. llvm-svn: 161317
* PR13499: Don't try to check whether 'override' has been validly applied untilRichard Smith2012-08-061-35/+39
| | | | | | | we know whether the function is virtual. But check it as soon as we do know; in some cases we don't need to wait for an instantiation. llvm-svn: 161316
* PR13527: don't assert if a function is explicitly defaulted when it's alreadyRichard Smith2012-08-062-1/+3
| | | | | | been defined. llvm-svn: 161315
* Add __builtin_readcyclecounter() to produce the @llvm.readcyclecounter() ↵Hal Finkel2012-08-051-0/+4
| | | | | | intrinsic. llvm-svn: 161310
* Simplify code, no functionality change.Benjamin Kramer2012-08-042-8/+3
| | | | llvm-svn: 161303
* [analyzer] Malloc: remove assert since is not valid as of r161248Anna Zaks2012-08-041-5/+0
| | | | | | | We can be in the situation where we did not track the symbol before realloc was called on it. llvm-svn: 161294
* objective-C string literal has no side-effect,Fariborz Jahanian2012-08-041-0/+1
| | | | | | | resulting in issuance of unused static variable warning now. // rdar://10777111 llvm-svn: 161291
* [analyzer] Use a more robust check for null in CallAndMessageChecker.Jordan Rose2012-08-041-2/+12
| | | | | | This should fix the failing test on the buildbot as well. llvm-svn: 161290
* [analyzer] Don't assume values bound to references are automatically non-null.Jordan Rose2012-08-041-3/+18
| | | | | | | | | | | While there is no such thing as a "null reference" in the C++ standard, many implementations of references (including Clang's) do not actually check that the location bound to them is non-null. Thus unlike a regular null dereference, this will not cause a problem at runtime until the reference is actually used. In order to catch these cases, we need to not prune out paths on which the input pointer is null. llvm-svn: 161288
* Fix the name of this variable.Eric Christopher2012-08-041-4/+4
| | | | llvm-svn: 161287
* Update comment to accurately reflect what should happen.Eric Christopher2012-08-041-1/+1
| | | | llvm-svn: 161286
* [analyzer] Update initializer assertion for delegating constructors.Jordan Rose2012-08-032-2/+12
| | | | | | | | | | Like base constructors, delegating constructors require no further processing in the CFGInitializer node. Also, add PrettyStackTraceLoc to the initializer and destructor logic so we can get better stack traces in the future. llvm-svn: 161283
* [analyzer] When a symbol is null, we should track its constraints.Jordan Rose2012-08-0315-54/+46
| | | | | | | | Because of this, we would previously emit NO path notes when a parameter is constrained to null (because there are no stores). Now we show where we made the assumption, which is much more useful. llvm-svn: 161280
* [analyzer] Flatten path diagnostics for text output like we do for HTML.Jordan Rose2012-08-034-34/+50
| | | | llvm-svn: 161279
* [analyzer] Track null/uninitialized C++ objects used in method calls.Jordan Rose2012-08-032-24/+16
| | | | llvm-svn: 161278
* [analyzer] Provide useful PathDiagnosticLocations for CallEnter/Exit events.Jordan Rose2012-08-031-37/+51
| | | | llvm-svn: 161277
* [analyzer] FindLastStoreBRVisitor was not actually finding stores.Jordan Rose2012-08-031-11/+11
| | | | | | | | | | | The visitor walks back through the ExplodedGraph as expected, but it wasn't actually keeping track of when a value was assigned. This meant that it only worked when the value was assigned when the variable was defined. Tests in the next commit (dependent on another change). llvm-svn: 161276
* Enhance getImplicitObjectArgument to look through ->*.Jordan Rose2012-08-031-2/+5
| | | | | | | This only applies in the case where ->* is not overloaded, since it specifically looks for BinaryOperator and not CXXOperatorCallExpr. llvm-svn: 161275
* Make property synthesis the default on Windows.Fariborz Jahanian2012-08-031-0/+4
| | | | llvm-svn: 161266
* [analyzer] Fixup: remove the extra whitespaceAnna Zaks2012-08-031-26/+0
| | | | llvm-svn: 161265
* [analyzer] ObjC Inlining: Start tracking dynamic type info in the GDMAnna Zaks2012-08-032-3/+65
| | | | | | | | | | | In the following code, find the type of the symbolic receiver by following it and updating the dynamic type info in the state when we cast the symbol from id to MyClass *. MyClass *a = [[self alloc] init]; return 5/[a testSelf]; llvm-svn: 161264
* Comment diagnostics: warn if \returns is used in a non-function comment or ifDmitri Gribenko2012-08-032-7/+47
| | | | | | the function returns void. llvm-svn: 161261
* Fix crash if a literal operator template's template parameter pack is not a ↵Richard Smith2012-08-031-1/+1
| | | | | | non-type template parameter pack. Patch by Andy Gibbs! llvm-svn: 161260
* [analyzer] Fix a typo. Thanks Jordan.Anna Zaks2012-08-031-1/+1
| | | | llvm-svn: 161249
* [analyzer] Malloc: track non-allocated but freed memoryAnna Zaks2012-08-031-12/+4
| | | | | | | | | | There is no reason why we should not track the memory which was not allocated in the current function, but was freed there. This would allow to catch more use-after-free and double free with no/limited IPA. Also fix a realloc issue which surfaced as the result of this patch. llvm-svn: 161248
* Fix line endings.Michael Han2012-08-031-41/+41
| | | | llvm-svn: 161245
* Flesh out test for defaulted key functions a bit more.Benjamin Kramer2012-08-031-0/+1
| | | | llvm-svn: 161243
* Fix failed to generate vtables in certain cases.Benjamin Kramer2012-08-031-0/+3
| | | | | | | | | | | By C++ standard, the vtable should be generated if the first non-inline virtual function is defined in the TU. Current version of clang doesn't generate vtable if the first virtual function is defaulted, because the key function is regarded as the defaulted function. Patch by Li Kan! llvm-svn: 161236
* Comment AST: convert a huge if -- else if statement on Decl's type into aDmitri Gribenko2012-08-031-17/+56
| | | | | | switch. Thanks Sean Silva for suggestion! llvm-svn: 161225
* [analyzer] Solve another source of non-determinism in the diagnosticAnna Zaks2012-08-022-14/+7
| | | | | | | | | | | | engine. The code that was supposed to split the tie in a deterministic way is not deterministic. Most likely one of the profile methods uses a pointer. After this change we do finally get the consistent diagnostic output. Testing this requires running the analyzer on large code bases and diffing the results. llvm-svn: 161224
* Comments AST: refactor DeclInfo to use an enum for decl kind instead ofDmitri Gribenko2012-08-022-5/+18
| | | | | | separate flags. llvm-svn: 161217
* [driver] Lipo can handle the lto-bc type.Chad Rosier2012-08-021-1/+2
| | | | | | rdar://12000401 llvm-svn: 161216
OpenPOWER on IntegriCloud