summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Comments: handle template paramter documentation in alias-declarationDmitri Gribenko2012-08-021-0/+4
| | | | | | templates. llvm-svn: 161215
* [analyzer] Add a simple check for initializing reference variables with null.Jordan Rose2012-08-021-94/+152
| | | | | | | | | There's still more work to be done here; this doesn't catch reference parameters or return values. But it's a step in the right direction. Part of <rdar://problem/11212286>. llvm-svn: 161214
* Attaching comments to declarations: handle using-declaration.Dmitri Gribenko2012-08-022-2/+3
| | | | llvm-svn: 161211
* objective-c arc: Patch to suggest bridge casting of CFFariborz Jahanian2012-08-021-2/+31
| | | | | | | objects used as dictionary subscript objects. // rdar://11913153 llvm-svn: 161187
* ASTContext.h: replace include by a forward declaration.Dmitri Gribenko2012-08-021-0/+1
| | | | llvm-svn: 161186
* Add OpenBSD arch targets for powerpc, arm, mips64, mips64el and sparc.Hans Wennborg2012-08-021-1/+13
| | | | | | Contributed by Brad Smith <brad@comstyle.com> llvm-svn: 161175
* Correct AddDefaultCIncludePaths for OpenBSD to not include /usr/local/includeHans Wennborg2012-08-021-0/+1
| | | | | | | | | in the default search path. Compilers on *BSD OS's only include /usr/include by default. Contributed by Brad Smith <brad@comstyle.com> llvm-svn: 161173
* [analyzer] Also emit Prev/Next links for macros in HTML output. Oops.Jordan Rose2012-08-021-2/+15
| | | | llvm-svn: 161154
* [analyzer] Add Prev/Next links to the HTML output.Jordan Rose2012-08-022-3/+26
| | | | llvm-svn: 161153
* [analyzer] Flush bug reports in deterministic order.Anna Zaks2012-08-021-3/+4
| | | | | | | | | | This makes the diagnostic output order deterministic. 1) This makes order of text diagnostics consistent from run to run. 2) Also resulted in different bugs being reported (from one run to another) with plist-html output. llvm-svn: 161151
* Make sure we don't emit IR for unused EH cleanups. PR13359.Eli Friedman2012-08-021-2/+6
| | | | llvm-svn: 161148
* Initialize flag in DeclInfo.Dmitri Gribenko2012-08-011-0/+1
| | | | llvm-svn: 161141
* Comment AST: add DeclInfo to store information about the declaration. Sema wasDmitri Gribenko2012-08-012-67/+86
| | | | | | already extracting most of this, but discarding at the end of semantic analysis. llvm-svn: 161140
* Fix an assertion failure instantiating a constexpr function from within a ↵Eli Friedman2012-08-014-14/+14
| | | | | | -dealloc method. PR13401. llvm-svn: 161135
OpenPOWER on IntegriCloud