summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* CommentSema: add more inline commands to tablesDmitri Gribenko2012-07-191-2/+3
| | | | llvm-svn: 160481
* Fix ParagraphComment::isWhitespace(): a paragraph without a non-whitespaceDmitri Gribenko2012-07-191-1/+2
| | | | | | | TextComment node was considered whitespace even if it contained other child nodes. llvm-svn: 160474
* Fix OverloadCandidateSet::clear to not leak PartialDiagnostics, found by SamuelRichard Smith2012-07-181-1/+4
| | | | | | | | Panzer. I've not been able to trigger a failure caused by this, so no test yet. Also included is a small change from Paul Robinson to only consider the FailureKind if the overload candidate did actually fail. llvm-svn: 160470
* Comment::dump(): show name of inline commandDmitri Gribenko2012-07-181-0/+1
| | | | llvm-svn: 160467
* Comment parsing: don't parse whitespace before \endverbatim as a separate ↵Dmitri Gribenko2012-07-181-0/+10
| | | | | | line of whitespace. llvm-svn: 160464
* [analyzer] Combine all ObjC message CallEvents into ObjCMethodCall.Jordan Rose2012-07-186-98/+150
| | | | | | | | | | | | As pointed out by Anna, we only differentiate between explicit message sends This also adds support for ObjCSubscriptExprs, which are basically the same as properties in many ways. We were already checking these, but not emitting nice messages for them. This depends on the llvm::PointerIntPair change in r160456. llvm-svn: 160461
* [analyzer] Rename addExtraInvalidatedRegions to get...RegionsJordan Rose2012-07-181-6/+6
| | | | | | | | | Per Anna's comment that "add..." sounds like a method that modifies the receiver, rather than its argument. No functionality change. llvm-svn: 160460
* [analyzer] Make CallEvent a value object.Jordan Rose2012-07-181-39/+44
| | | | | | | | | | | | | | | | We will need to be able to easily reconstruct a CallEvent from an ExplodedNode for diagnostic purposes, and that's exactly what factory functions are for. CallEvent objects are small enough (four pointers and a SourceLocation) that returning them through the stack is fairly cheap. Clients who just need to use existing CallEvents can continue to do so using const references. This uses the same sort of "kind-field-dispatch" as SVal, though most of the nastiness is contained in the DISPATCH and DISPATCH_ARG macros at the end of the file. (We can't use a template for this because member-pointers to base class methods don't call derived-class methods even when casting to the derived class. We can't use variadic macros because they're a C99 feature.) llvm-svn: 160459
* [analyzer] Remove obsolete ObjCPropRef SVal kind.Jordan Rose2012-07-183-31/+4
| | | | | | | | | | | ObjC properties are handled through their semantic form of ObjCMessageExprs and their wrapper PseudoObjectExprs, and have been for quite a while. The syntactic ObjCPropertyRefExprs do not appear in the CFG and are not visited by ExprEngine. No functionality change. llvm-svn: 160458
* [analyzer] Remove unused ExprEngine::VisitCXXTemporaryObjectExpr.Jordan Rose2012-07-181-6/+0
| | | | llvm-svn: 160457
* This fits into 80 columns without wrapping.Dmitri Gribenko2012-07-181-2/+1
| | | | llvm-svn: 160453
* Add caching for TextComment::isWhitespace(), ParagraphComment::isWhitespace().Dmitri Gribenko2012-07-181-2/+2
| | | | llvm-svn: 160452
* Remove trivial destructor from SVal.Benjamin Kramer2012-07-182-2/+1
| | | | | | | | | | This enables the faster SmallVector in clang and also allows clang's unused variable warnings to be more effective. Fix the two instances that popped up. The RetainCountChecker change actually changes functionality, it would be nice if someone from the StaticAnalyzer folks could look at it. llvm-svn: 160444
* On Darwin, the linker removes functions in CommentDumper.o (Comment::dump())Dmitri Gribenko2012-07-182-8/+16
| | | | | | | | | | | | despite __attribute__(__used__). As explained by Argyrios, > .a archive files do some stripping of their own and they remove .o files that > contain functions that are not referenced by any other .o file. The fix is to use these functions from another .o file. Thanks, Argyrios! llvm-svn: 160437
* Reverted custom init hook from r160369.Alexander Kornienko2012-07-182-42/+0
| | | | llvm-svn: 160432
* Fix crash in RegionStoreManager::evalDerivedToBase() due to not handling ↵Ted Kremenek2012-07-181-0/+12
| | | | | | | | | | references (in uses of dynamic_cast<>). Fixes <rdar://problem/11817693>. llvm-svn: 160427
* Teach CFG construction about destructors resulting from references to array ↵Ted Kremenek2012-07-181-5/+4
| | | | | | types. Fixes crash in <rdar://problem/11671507>. llvm-svn: 160424
* PR13381, part 2: when determining if a defaulted special member function shouldRichard Smith2012-07-181-9/+18
| | | | | | | | be defined as deleted, take cv-qualifiers on class members into account when looking up the copy or move constructor or assignment operator which will be used for them. llvm-svn: 160418
* PR13381: consider cv-qualifiers on a class member's type when determining whichRichard Smith2012-07-182-16/+26
| | | | | | | constructor will be used for moving that object, in the computation of its exception specification. llvm-svn: 160417
* PR13386: When matching up parameters between a function template declarationRichard Smith2012-07-182-31/+39
| | | | | | | | | | | and a function template instantiation, if there's a parameter pack in the declaration and one at the same place in the instantiation, don't assume that the pack wasn't expanded -- it may have expanded to nothing. Instead, go ahead and check whether the parameter pack was expandable. We can do this as a side-effect of the work we'd need to do anyway, to find how many parameters were produced. llvm-svn: 160416
* CommentSema: \short is the same as \brief.Dmitri Gribenko2012-07-181-2/+2
| | | | llvm-svn: 160414
* When performing the deduced/actual argument type check for C++Douglas Gregor2012-07-181-0/+10
| | | | | | | | [temp.deduct.call]p4 under Objective-C++ ARC, make sure to adjust the qualifiers to introduce the implicit strong lifetime when needed. Fixes <rdar://problem/11825671>. llvm-svn: 160412
* More replacing of target-dependent intrinsics with target-indepdent Joel Jones2012-07-181-2/+3
| | | | | | | | | | | | | | | | | | | | | intrinsics. The second instruction(s) to be handled are the vector versions of count set bits (ctpop). The changes here are to clang so that it generates a target independent vector ctpop when it sees an ARM dependent vector bits set count. The changes in llvm are to match the target independent vector ctpop and in VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM dependent vector pop counts with target-independent ctpops. There are also changes to an existing test case in llvm for ARM vector count instructions and to a test for the bitcode upgrade. <rdar://problem/11892519> There is deliberately no test for the change to clang, as so far as I know, no consensus has been reached regarding how to test neon instructions in clang; q.v. <rdar://problem/8762292> llvm-svn: 160409
* Remove unnecessary spacing around Objective-C object literal codeDouglas Gregor2012-07-171-9/+3
| | | | | | completions. Fixes <rdar://problem/11889572>. llvm-svn: 160407
* Adding a fixit for includes that cannot be found with angle brackets, but ↵Aaron Ballman2012-07-171-3/+22
| | | | | | can be found with quoted strings instead. Implements PR13201. llvm-svn: 160406
* Implement an optimization for finding the comment that occurs just after aDmitri Gribenko2012-07-171-6/+24
| | | | | | | | | | given declaration. It is based on the observation that during parsing the comment that should be attached to the decl is usually among the last two documentation comments parsed. llvm-svn: 160400
* CommentBriefParser: use StringSwitch::Cases to group synonyms. Thanks Jordan!Dmitri Gribenko2012-07-171-9/+4
| | | | llvm-svn: 160396
* Teach the ASTImporter how to handle anonymous structs/unionsDouglas Gregor2012-07-172-24/+53
| | | | | | | better. Fixes <rdar://problem/11466212>; the test (and back-ported version of this code) were committed to LLDB in r160186. llvm-svn: 160395
* Don't treat overflow in floating-point conversions as a hard error in ↵Eli Friedman2012-07-171-6/+5
| | | | | | constant evaluation. <rdar://problem/11874571>. llvm-svn: 160394
* Handle the case where the base type is not dependent, but the derived one is.Rafael Espindola2012-07-172-2/+3
| | | | | | Fixes pr13353.cpp. llvm-svn: 160393
* Fixed whitespace issue introduced in r160373.Joao Matos2012-07-171-8/+7
| | | | llvm-svn: 160388
* CommentBriefParser: make \short should equivalent to \brief, per Doxygen manual.Dmitri Gribenko2012-07-171-1/+2
| | | | llvm-svn: 160383
* Issue warning when assigning out-of-range integer values to enums.Fariborz Jahanian2012-07-172-1/+53
| | | | | | | Due to performance cost, this is an opt-in option placed under -Wassign-enum. // rdar://11824807 llvm-svn: 160382
* -Wobjc-literal-compare: don't warn when comparing against nil.Jordan Rose2012-07-171-2/+16
| | | | | | | | | | | | | | Checks against nil often appear as guards in macros, and comparing Objective-C literals to nil has well-defined behavior (if tautological). On OS X, 'nil' has not been typed as 'id' since 10.6 (possibly earlier), so the warning was already not firing, but other runtimes continue to use ((id)0) or some variant. This change accepts comparisons to any null pointer; to keep it simple, it looks through all casts (not just casts to 'id'). PR13276 llvm-svn: 160379
* Add -Wobjc-string-compare under -Wobjc-literal-compare.Jordan Rose2012-07-171-9/+22
| | | | | | | | | Suggested by Ted, since string literal comparison is at least slightly more sensible than comparison of runtime literals. (Ambiguous language on developer.apple.com implies that strings are guaranteed to be uniqued within a translation unit and possibly across a linked binary.) llvm-svn: 160378
* Now that -Wobjc-literal-compare is a warning, put the fixit on a note.Jordan Rose2012-07-171-100/+66
| | | | | | | | Recovering as if the user had actually called -isEqual: is a bit too far from the semantics of the program as written, /even though/ it's probably what they intended. llvm-svn: 160377
* [analyzer] Remove stale result type lvalue code.Jordan Rose2012-07-171-10/+2
| | | | | | | This code has been moved around multiple times, but seems to have been obsolete ever since we started handled references like pointers. llvm-svn: 160375
* [Windows] Abstract pure virtual method calls in the ABI. Fix the Windows ABI ↵Joao Matos2012-07-174-8/+15
| | | | | | to forward to the correct function. llvm-svn: 160373
* Add a custom initialize hook for clang tools + minor fixes in ↵Alexander Kornienko2012-07-174-3/+50
| | | | | | CustomCompilationDatabase.h llvm-svn: 160369
* Merge visibility from previous decls before looking at visibility pragma. ThisRafael Espindola2012-07-171-4/+4
| | | | | | | is a bit fuzzy, but matches gcc behavior and existing code bases seem to depend on it. llvm-svn: 160364
* Finishing the move of RefactoringCallbacks and fixing the correspondingDaniel Jasper2012-07-171-11/+14
| | | | | | buildbot failures. llvm-svn: 160355
* Revert commit r160308. We decide to move builtins selection to the backend.Simon Atanasyan2012-07-172-30/+0
| | | | llvm-svn: 160353
* Move RefactoringCallbacks to Tooling to avoid dependency fromDaniel Jasper2012-07-173-2/+3
| | | | | | | ASTMatchers (lower level abstraction) to Tooling (higher level abstraction). llvm-svn: 160351
* Make the isDerivedFrom matcher more generic.Daniel Jasper2012-07-171-37/+27
| | | | | | | It now accepts an arbitrary inner matcher but is fully backwards compatible. llvm-svn: 160348
* [Win32] Rework crash-report since r145389.NAKAMURA Takumi2012-07-171-7/+1
| | | | | | | | | | | - lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions. - test/Driver/crash-report.c: Add REQUIRES:shell for now. FIXME: setenv should work also on Lit.InternalShellRunner. - test/Driver/crash-report.c: Remove XFAIL. Thanks to Chad, To point out the issue. llvm-svn: 160343
* Record visibility pragmas when we see a tag declaration. We might use itRafael Espindola2012-07-171-0/+4
| | | | | | to build a type before seeing the definition. llvm-svn: 160339
* Uninitialized variables: two little changes:Richard Smith2012-07-172-1/+4
| | | | | | | * Treat compound assignment as a use, at Jordy's request. * Always add compound assignments into the CFG, so we can correctly diagnose the use in 'return x += 1;' llvm-svn: 160334
* -Wuninitialized: Split the classification of DeclRefExprs as initialization orRichard Smith2012-07-171-228/+223
| | | | | | | | | | use out of TransferFunctions, and compute it in advance rather than on-the-fly. This allows us to handle compound assignments with DeclRefExprs on the RHS correctly, and also makes it trivial to treat const& function parameters as not initializing the argument. The patch also makes both of those changes. llvm-svn: 160330
* [analyzer] Handle new-expressions with initializers for scalars.Jordan Rose2012-07-162-11/+23
| | | | | | <rdar://problem/11818967> llvm-svn: 160328
* Don't crash when emitting fixits following Unicode characters.Jordan Rose2012-07-161-27/+26
| | | | | | | | | | | | | | | This code is very sensitive to the difference between "columns" as printed and "bytes" (SourceManager columns). All variables are now named explicitly and our assumptions are (hopefully) documented as both comment and assertion. Whether parseable fixits should use byte offsets or Unicode character counts is pending discussion on the mailing list; currently the implementation uses bytes (and has no problems on lines containing multibyte characters). This has been added to the user manual. <rdar://problem/11877454> llvm-svn: 160319
OpenPOWER on IntegriCloud