summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix a CodeGen bug where we would skip zero-initialization forEli Friedman2012-08-252-4/+11
| | | | | | array new with a non-trivial constructor. Pointed out in PR13380. llvm-svn: 162643
* Remove spurious string literal for bool argument.Richard Smith2012-08-251-1/+1
| | | | llvm-svn: 162642
* _HAS_CHAR16_T_LANGUAGE_SUPPORT is not predefined MSVC macro.Francois Pichet2012-08-251-4/+0
| | | | llvm-svn: 162641
* Change --with-analyzer to --use-analyzer, per sage feedback from Jordan.Ted Kremenek2012-08-251-5/+5
| | | | llvm-svn: 162640
* Fix the CC-matching logic for instance methods in the MS ABI.John McCall2012-08-252-2/+77
| | | | | | Patch by Timur Iskhodzhanov! llvm-svn: 162639
* Fix the mangling of function pointers in the MS ABI.John McCall2012-08-253-2/+82
| | | | | | Patch by Timur Iskhodzhanov! llvm-svn: 162638
* [analyzer] Use the common evalBind infrastructure for initializers.Jordan Rose2012-08-256-33/+52
| | | | | | | | | | | | | | | | | | | This allows checkers (like the MallocChecker) to process the effects of the bind. Previously, using a memory-allocating function (like strdup()) in an initializer would result in a leak warning. This does bend the expectations of checkBind a bit; since there is no assignment expression, the statement being used is the initializer value. In most cases this shouldn't matter because we'll use a PostInitializer program point (rather than PostStmt) for any checker-generated nodes, though we /will/ generate a PostStore node referencing the internal statement. (In theory this could have funny effects if someone actually does an assignment within an initializer; in practice, that seems like it would be very rare.) <rdar://problem/12171711> llvm-svn: 162637
* Stub out a release notes section on -fcatch-undefined-behavior.Richard Smith2012-08-251-0/+7
| | | | llvm-svn: 162636
* Update the user's manual for some of the new -fcatch-undefined-behavior ↵Richard Smith2012-08-251-5/+17
| | | | | | features. llvm-svn: 162635
* -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caughtRichard Smith2012-08-255-18/+104
| | | | | | | | | | | | | | | | by this mode, and also check for signed left shift overflow. The rules for the latter are a little subtle: * neither C89 nor C++98 specify the behavior of a signed left shift at all * in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior * in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has undefined behavior As of this change, we use the C99 rules for all C language variants, and the C++11 rules for all C++ language variants. Once we have individual -fcatch-undefined-behavior= flags, this should be revisited. llvm-svn: 162634
* [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.Chad Rosier2012-08-2523-133/+115
| | | | | | No functional change intended. llvm-svn: 162632
* ASTTests: Suppress TestCXXConstructorDecl11 on msvc for now. It seems ↵NAKAMURA Takumi2012-08-251-1/+2
| | | | | | incompatible. llvm-svn: 162631
* Remove RequireCompleteType call which was made redundant by r162586.Richard Smith2012-08-241-7/+0
| | | | llvm-svn: 162630
* [ms-inline asm] Update the AST Reader/Writer for MS-style inline asms.Chad Rosier2012-08-245-0/+14
| | | | llvm-svn: 162629
* objective-C: Do not warn if align attribute on methodFariborz Jahanian2012-08-242-5/+58
| | | | | | | declaration is not provided. It is only necessary on the method implementation. // rdar://11593375 llvm-svn: 162628
* Fix integer unsigned behavior in clang due to signed left shift overflow.Richard Smith2012-08-242-3/+4
| | | | llvm-svn: 162626
* Fix a few issues related to -with-analyzer reported by Jordan. Let'sTed Kremenek2012-08-241-5/+5
| | | | | | have the option with two '--' to be consistent with other options. llvm-svn: 162625
* Rework how scan-build picks the version of clang to use for static analysis.Ted Kremenek2012-08-241-40/+61
| | | | | | | | | | | Unless the user specifies, the clang used for static analysis is the one found relative to scan-build. If the user specifies -with-analyzer, they can pick either to use the clang bundled with Xcode (via xcrun) or they can specify a path to clang. llvm-svn: 162620
* Reformat help text for scan-build, and remove -constraintsTed Kremenek2012-08-241-58/+84
| | | | | | | and -store from help text because they are no longer relevant to users. llvm-svn: 162619
* When computing the effective context for access control,John McCall2012-08-243-6/+27
| | | | | | | | make sure we walk up the DC chain for the current context, rather than allowing ourselves to get switched over to the canonical DC chain. Fixes PR13642. llvm-svn: 162616
* New matcher for MaterializeTemporaryExprSam Panzer2012-08-242-0/+57
| | | | llvm-svn: 162609
* [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a Chad Rosier2012-08-249-17/+30
| | | | | | | | | CodeGen option to a LangOpt option. In turn, hoist the guard into the parser so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This should restore the behavior of clang to that prior to r158325. <rdar://problem/12163681> llvm-svn: 162602
* [analyzer] Ted fixed the plist-html issue, so the assert can go away.Anna Zaks2012-08-241-3/+1
| | | | llvm-svn: 162598
* [analyzer] More fixups/rewording based on Jordan's feedback.Anna Zaks2012-08-242-3/+3
| | | | llvm-svn: 162597
* Remove unnecessary calls to c_str.Benjamin Kramer2012-08-241-3/+3
| | | | llvm-svn: 162590
* Fix analyzer tests.Ted Kremenek2012-08-2488-107/+107
| | | | llvm-svn: 162588
* Revert "Go ahead and show experimental checkers in the scan-build "-h" output."Ted Kremenek2012-08-241-0/+9
| | | | llvm-svn: 162587
* Instantiate class template specializations during ADL.John McCall2012-08-244-9/+40
| | | | llvm-svn: 162586
* objective-C: When checking for valid overriden propertyFariborz Jahanian2012-08-242-1/+33
| | | | | | | | in class extension, assume default is rewdwrite and don't issue any diagnostics, privided other ownership models are ok. llvm-svn: 162583
* Rename the "experimental" checker package to "alpha". We will then refineTed Kremenek2012-08-241-18/+18
| | | | | | | this group into "alpha" and "beta" to distinguish between checkers in different levels of premature state. llvm-svn: 162582
* Rework how PathDiagnosticConsumers pass knowledge of what files theyTed Kremenek2012-08-244-14/+76
| | | | | | | | | | | | | generated for a given diagnostic to another. Because PathDiagnostics are specific to a give PathDiagnosticConsumer, store in a FoldingSet a unique hash for a PathDiagnostic (that will be the same for the same bug for different PathDiagnosticConsumers) that stores a list of files generated. This can then be read by the other PathDiagnosticConsumers. This fixes breakage in the PLIST-HTML output. llvm-svn: 162580
* [analyzer] Address Jordan's review comments.Anna Zaks2012-08-241-7/+5
| | | | llvm-svn: 162579
* Fix 80-column violation.Chad Rosier2012-08-241-1/+2
| | | | llvm-svn: 162575
* Comment diagnostics: for unresolved parameters, do not suggest parameter fixitDmitri Gribenko2012-08-244-74/+131
| | | | | | | | with parameter that is documented. Fixes PR13670, <rdar://problem/12155840>. llvm-svn: 162570
* [ms-inline asm] Refactor code. No functional change intended.Chad Rosier2012-08-243-17/+25
| | | | llvm-svn: 162568
* [ms-inline asm] Generate the Input/Output expressions using Chad Rosier2012-08-241-7/+14
| | | | | | Sema::ActOnIdExpression(). llvm-svn: 162564
* [analyzer] If we dereference a NULL that came from a function, show the return.Jordan Rose2012-08-242-0/+868
| | | | | | | | | | | | More generally, any time we try to track where a null value came from, we should show if it came from a function. This usually isn't necessary if the value is symbolic, but if the value is just a constant we previously just ignored its origin entirely. Now, we'll step into the function and recursively add a visitor to the returned expression. <rdar://problem/12114609> llvm-svn: 162563
* Fix 80-column violation.Chad Rosier2012-08-241-1/+2
| | | | llvm-svn: 162560
* Push ArrayRef through the Expr hierarchy.Benjamin Kramer2012-08-2417-281/+236
| | | | | | No functionality change. llvm-svn: 162552
* Fix the definition of JSONAnchorSource. MSVC mangles variable symbols, and ↵NAKAMURA Takumi2012-08-241-1/+1
| | | | | | "volatile" affects. llvm-svn: 162550
* Teach CFG that 'if (x & 0)' and 'if (x * 0)' is an unfeasible branch.Ted Kremenek2012-08-242-0/+33
| | | | | | Fixes <rdar://problem/11005770>. llvm-svn: 162545
* Allow RecursiveASTVisitor to visit CXXCtorInitializer objects for whichJames Dennett2012-08-243-43/+169
| | | | | | | | | | | isWritten() returns false, if shouldVisitImplicitCode() returns true. Previously those CXXCtorInitializers were always skipped. In order to make this change easier to test, this patch also extends the test class template ExpectedLocationVisitor to support arbitrary numbers of expected matches and disallowed matches. llvm-svn: 162544
* Go ahead and show experimental checkers in the scan-build "-h" output.Ted Kremenek2012-08-241-9/+0
| | | | | | | | | They are labeled as not being enabled-by-default, and how else are users going to test them. Fixes <rdar://problem/11654923> llvm-svn: 162543
* Use LLVM's plugin registry to enable registering new compilationDaniel Jasper2012-08-249-373/+474
| | | | | | | databases. Move JSONCompilationDatabase.h to its own files and register it as plugin. llvm-svn: 162541
* Rename the ASTMatchers to better match AST nodes. Now, allDaniel Jasper2012-08-244-661/+646
| | | | | | | | | ASTMatchers have the same name as the corresponding AST nodes but are lower case. The only exceptions are the "CXX" prefixes which are not copied over to the matcher names as the goal is to actually remove these prefixes from the AST node names. llvm-svn: 162536
* On OS X, use xcrun (if present) to find the clang to use for static analysis ifTed Kremenek2012-08-241-6/+20
| | | | | | | | no clang can be found relative to the location of scan-build. Fixes <rdar://problem/11691794> llvm-svn: 162535
* [analyzer] Fix realloc related bug in the malloc checker.Anna Zaks2012-08-242-17/+52
| | | | | | | When reallocation of a non-allocated (not owned) symbol fails do not expect it to be freed. llvm-svn: 162533
* [analyzer] Remove unnecessary code.Anna Zaks2012-08-241-16/+0
| | | | | | | | This code has been added a while ago and removing it does not trigger any test failures. The false positives it was trying to suppress are probably handled by other logic (ex: special handling of delegates). llvm-svn: 162529
* [analyzer] Move DynamicTypeInfo out of the ProgramState.hAnna Zaks2012-08-242-34/+57
| | | | | | | (I am not sure if we should move the setters and getters as well and make them into static methods..) llvm-svn: 162528
* New -fcatch-undefined-behavior features:Richard Smith2012-08-247-32/+178
| | | | | | | | * when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check * check that references are bound to appropriate storage * check that 'this' has appropriate storage in member accesses and member function calls llvm-svn: 162523
OpenPOWER on IntegriCloud