summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Track if a region can be a subclass in the dynamic type info.Anna Zaks2012-08-102-5/+14
| | | | | | | When object is allocated with alloc or init, we assume it cannot be a subclass (currently used only for bifurcation purposes). llvm-svn: 161682
* [analyzer] Optimize dynamic dispatch bifurcation by detecting the casesAnna Zaks2012-08-101-2/+59
| | | | | | | | | | | | | | | | when we don't need to split. In some cases we know that a method cannot have a different implementation in a subclass: - the class is declared in the main file (private) - all the method declarations (including the ones coming from super classes) are in the main file. This can be improved further, but might be enough for the heuristic. (When we are too aggressive splitting the state, efficiency suffers. When we fail to split the state coverage might suffer.) llvm-svn: 161681
* Refactor thread safety analysis to use a different data structureDeLesley Hutchins2012-08-101-117/+213
| | | | | | to track locksets. This is in preparation for further changes. llvm-svn: 161680
* [ms-inline asm] Use asserts as these calls are now guarded by identical checks.Chad Rosier2012-08-101-9/+5
| | | | llvm-svn: 161676
* objective-C++: delayed parsing of member function withFariborz Jahanian2012-08-102-5/+17
| | | | | | | function-try-block occuring in objc's implementation block. wip. llvm-svn: 161675
* Whitespace.Chad Rosier2012-08-101-31/+31
| | | | llvm-svn: 161673
* objective-C++: Delayed parsing of most commonFariborz Jahanian2012-08-102-15/+21
| | | | | | | member functions defined inside an objc class implementation. wip. llvm-svn: 161667
* Add missing cctype includes.Joerg Sonnenberger2012-08-108-0/+9
| | | | llvm-svn: 161660
* Decrementing std::string::end is not portable, use array access instead.Joerg Sonnenberger2012-08-101-1/+1
| | | | llvm-svn: 161659
* Fix a couple of pedantic gcc warnings.Benjamin Kramer2012-08-101-1/+1
| | | | llvm-svn: 161656
* Check access to friend declarations. There's a number of differentJohn McCall2012-08-104-35/+79
| | | | | | | | | | | | | | things going on here that were problematic: - We were missing the actual access check, or rather, it was suppressed on account of being a redeclaration lookup. - The access check would naturally happen during delay, which isn't appropriate in this case. - We weren't actually emitting dependent diagnostics associated with class templates, which was unfortunate. - Access was being propagated incorrectly for friend method declarations that couldn't be matched at parse-time. llvm-svn: 161652
* Update VerifyDiagnosticConsumer to only get directives during parsing.Jordan Rose2012-08-102-46/+143
| | | | | | | | | | | | | | | | | | | | The old behavior was to re-scan any files (like modules) where we may have directives but won't actually be parsing during the -verify invocation. Now, we keep the old behavior in Debug builds as a sanity check (though modules are a known entity), and expect all legitimate directives to come from comments seen by the preprocessor. This also affects the ARC migration tool, which captures diagnostics in order to filter some out. This change adds an explicit cleanup to CaptureDiagnosticsConsumer in order to let its sub-consumer handle the real end of diagnostics. This was originally split into four patches, but the tests do not run cleanly without all four, so I've combined them into one commit. Patches by Andy Gibbs, with slight modifications from me. llvm-svn: 161650
* Make sure to call EndSourceFile even if we can't continue compiling.Jordan Rose2012-08-101-1/+5
| | | | | | Patch by Andy Gibbs! llvm-svn: 161649
* Provide isConst/Volatile on CXXMethodDecl.David Blaikie2012-08-107-19/+18
| | | | | | | | | This also provides isConst/Volatile/Restrict on FunctionTypes to coalesce the implementation with other callers (& update those other callers). Patch contributed by Sam Panzer (panzer@google.com). llvm-svn: 161647
* [ms-inline asm] Use the new Inline Asm Non-Standard Dialect attribute.Chad Rosier2012-08-101-0/+1
| | | | llvm-svn: 161642
* [analyzer] Merge RegionStore's KillStruct and CopyLazyBindings: BindAggregate.Jordan Rose2012-08-091-40/+21
| | | | | | | | | | | Both methods need to clear out existing bindings and provide a new default binding. Originally KillStruct always provided UnknownVal as the default, but it's allowed symbolic values for quite some time (for handling returned structs in C). No functionality change. llvm-svn: 161637
* [analyzer] Cluster bindings in RegionStore by base region.Jordan Rose2012-08-092-181/+237
| | | | | | | | | | | | This should speed up activities that need to access bindings by cluster, such as invalidation and dead-bindings cleaning. In some cases all we save is the cost of building the region cluster map, but other times we can actually avoid traversing the rest of the store. In casual testing, this produced a speedup of nearly 10% analyzing SQLite, with /less/ memory used. llvm-svn: 161636
* [analyzer] Cache the "concrete offset base" for regions with symbolic offsets.Jordan Rose2012-08-092-45/+63
| | | | | | | | | This makes it faster to access and invalidate bindings with symbolic offsets by only computing this information once. No intended functionality change. llvm-svn: 161635
* Followup to r161546, to unbreak linking on Bitrig. Patch by David Hill.Eli Friedman2012-08-091-0/+4
| | | | llvm-svn: 161630
* CMake: Add the new dependency from libSema to LLVM's libs.Benjamin Kramer2012-08-091-0/+7
| | | | | | Should fix the failures seen on some linux builders. llvm-svn: 161629
* [ms-inline asm] Fix comment.Chad Rosier2012-08-091-1/+1
| | | | llvm-svn: 161622
* [analyzer] A CXXBaseObjectRegion should correspond to a DIRECT base.Jordan Rose2012-08-092-1/+12
| | | | | | | | | | | An ASTContext's RecordLayoutInfo can only be used to look up offsets of direct base classes, and we need the offset to make non-symbolic bindings in RegionStore. This change makes sure that we have one layer of CXXBaseObjectRegion for each base we are casting through. This was causing crashes on an internal buildbot. llvm-svn: 161621
* objective-C: refactoring of objc's delayed parsing.Fariborz Jahanian2012-08-091-22/+3
| | | | llvm-svn: 161620
* [ms-inline asm] Use StringRef here, per Jordan's suggestion.Chad Rosier2012-08-092-3/+3
| | | | llvm-svn: 161619
* [analyzer] Rename the function to better reflect what it actually does.Anna Zaks2012-08-092-6/+4
| | | | llvm-svn: 161617
* [analyzer] Clarify the values in Dyn. Dispatch Bifurcation map.Anna Zaks2012-08-091-5/+12
| | | | llvm-svn: 161616
* [ms-inline asm] Simplify logic for empty asm statements.Chad Rosier2012-08-091-0/+10
| | | | llvm-svn: 161615
* [ms-inline asm] Instantiate the various parts to the AsmParser.Chad Rosier2012-08-091-4/+40
| | | | llvm-svn: 161614
* In 'delete []', the '[]' never starts a lambda. Update a FIXME with a ↵Richard Smith2012-08-091-4/+8
| | | | | | standard reference and add a test. llvm-svn: 161604
* [analyzer] Improve readability of the dyn. dispatch bifurcation patchAnna Zaks2012-08-092-27/+26
| | | | | | | | r161552. As per Jordan's feedback. llvm-svn: 161603
* Comment to HTML and XML conversion: ignore commands that contain a declarationDmitri Gribenko2012-08-091-8/+32
| | | | | | as their argument. For example, \fn, \function, \typedef, \method, \class etc. llvm-svn: 161601
* [ms-inline asm] Initialize targets and assembly printers/parsers.Chad Rosier2012-08-091-0/+6
| | | | llvm-svn: 161595
* objective-C: minor refactoring in methodFariborz Jahanian2012-08-091-9/+4
| | | | | | definition parsing logic. llvm-svn: 161593
* Unbreak the build.Anna Zaks2012-08-092-4/+4
| | | | | | Declaring "const Decl *Decl" is not a good idea. llvm-svn: 161567
* [analyzer] Cleanup of malloc checker.Anna Zaks2012-08-091-22/+1
| | | | | | | Remove Escaped state, which is not really necessary. We can just stop tracking the symbol instead of keeping it around and marking escaped. llvm-svn: 161557
* Fix AAPCS ABI. I can't actually test this, but it restores the behavior ↵Eli Friedman2012-08-091-9/+12
| | | | | | from before r159168. PR13562. llvm-svn: 161554
* [analyzer] Bifurcate the path with dynamic dispatch.Anna Zaks2012-08-092-39/+124
| | | | | | | | | | | | | This is an initial (unoptimized) version. We split the path when inlining ObjC instance methods. On one branch we always assume that the type information for the given memory region is precise. On the other we assume that we don't have the exact type info. It is important to check since the class could be subclassed and the method can be overridden. If we always inline we can loose coverage. Had to refactor some of the call eval functions. llvm-svn: 161552
* Add new file CommentCommandTraits.cpp to CMakeLists.txt.Dmitri Gribenko2012-08-091-0/+1
| | | | llvm-svn: 161551
* Comment parsing: extract TableGen'able pieces into new CommandTraits class.Dmitri Gribenko2012-08-097-180/+152
| | | | llvm-svn: 161548
* clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman2012-08-089-0/+307
| | | | llvm-svn: 161546
* Minor simplification for r161534.Eli Friedman2012-08-082-8/+5
| | | | llvm-svn: 161544
* objective-C: refactor/simplify parsing of delayedFariborz Jahanian2012-08-082-29/+8
| | | | | | | method/c-funcs defined in objc class implementation. No intended functionality change. llvm-svn: 161540
* Fix r161534 so it actually builds.Eli Friedman2012-08-081-2/+1
| | | | llvm-svn: 161539
* PR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently.Richard Smith2012-08-082-8/+8
| | | | llvm-svn: 161537
* Handle deprecation diagnostics correctly for C struct fields and Objective-C ↵Eli Friedman2012-08-083-12/+37
| | | | | | properties/ivars. <rdar://problem/6642337>. llvm-svn: 161534
* Unify the codepaths for emitting deprecation warnings. The test changes are ↵Eli Friedman2012-08-081-31/+25
| | | | | | just to account for us emitting notes more consistently. llvm-svn: 161528
* Address code review comments for Wstrncat-size warning (r161440).Anna Zaks2012-08-081-24/+26
| | | | llvm-svn: 161527
* [ms-inline asm] Use more idiomatic logic. Thanks, Bill.Chad Rosier2012-08-081-2/+2
| | | | llvm-svn: 161526
* Implicitly annotate __CFStringMakeConstantString with format_arg(1).Jordan Rose2012-08-081-0/+7
| | | | | | | | | We handled the builtin version of this function in r157968, but the builtin isn't used when compiling as -fno-constant-cfstrings. This should complete <rdar://problem/6157200>. llvm-svn: 161525
* [ms-inline asm] Add basic codegen support for simple asm stmts. Currently,Chad Rosier2012-08-081-0/+15
| | | | | | only machine specific clobbers are modeled. llvm-svn: 161524
OpenPOWER on IntegriCloud