summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* When we have an Objective-C object with non-trivial lifetime in aDouglas Gregor2012-07-233-5/+8
| | | | | | | | structor class under ARC, that struct/class does not have a trivial move constructor or move assignment operator. Fixes the rest of <rdar://problem/11738725>. llvm-svn: 160615
* PR12917: Remove incorrect assumption that lambda mangling information cannotRichard Smith2012-07-224-66/+75
| | | | | | | | | | change once it's been assigned. It can change in two ways: 1) In a template instantiation, the context declaration should be the instantiated declaration, not the declaration in the template. 2) If a lambda appears in the pattern of a variadic pack expansion, the mangling number will depend on the pack length. llvm-svn: 160614
* Allow the parser to recover gracefully if a typename is used to introduce a ↵Francois Pichet2012-07-221-3/+5
| | | | | | | | | | decltype type. In Microsoft mode, we emit a warning instead of an error. This fixes a couple of errors when parsing the MSVC 11 RC headers with clang. llvm-svn: 160613
* char16_t and char32_t are defined via typedef in MSVC 11 RC. So introduce a ↵Francois Pichet2012-07-221-1/+5
| | | | | | way to disable keywords under Microsoft mode. llvm-svn: 160612
* Rename -fms-inline-asm to -fenable-experimental-ms-inline-asm.Chad Rosier2012-07-202-3/+3
| | | | llvm-svn: 160590
* Add "long double" to permitted list of ARM complex homogeneous aggregates.Tim Northover2012-07-201-1/+2
| | | | | | | Under AAPCS, long double is the same as double, which means it should be allowed as part of a homogeneous aggregate. llvm-svn: 160586
* Remove unused private member variable uncovered by the recent changes to ↵Benjamin Kramer2012-07-201-2/+1
| | | | | | clang's -Wunused-private-field. llvm-svn: 160584
* Add the mechanics for -fms-inline-asm. No easy way to test at this time.Chad Rosier2012-07-202-0/+3
| | | | llvm-svn: 160580
* Add a new flag, -fms-inline-asm, that enables the output of MS-style inlineChad Rosier2012-07-201-0/+4
| | | | | | | | | | | assembly. By default, we don't emit IR for MS-style inline assembly (see r158833 as to why). This is strictly for testing purposes and should not be enabled with the expectation that things will work. This is a temporary flag and will be removed once MS-style inline assembly is fully supported. llvm-svn: 160573
* No longer assuming the number of prototype arguments is always less than the ↵Aaron Ballman2012-07-201-1/+1
| | | | | | number of formal parameters for a variadic function call. llvm-svn: 160570
* Fix PR13411: Comment parsing: failed assertion on unterminated verbatim block.Dmitri Gribenko2012-07-201-5/+10
| | | | | | | | | | The assertion was wrong in case we have a verbatim block without a closing command. Also add tests for closing command name in a verbatim block, since now it can be empty in such cases. llvm-svn: 160568
* Re-apply r160319 "Don't crash when emitting fixits following Unicode chars"Jordan Rose2012-07-201-29/+29
| | | | | | | | | This time, make sure we don't try to print fixits with newline characters, since they don't have a valid column width, and they don't look good anyway. PR13417 (and originally <rdar://problem/11877454>) llvm-svn: 160561
* Add a reverse iterator to DeclStmt, and use it when building a CFG.Jordan Rose2012-07-201-5/+4
| | | | | | | The CFG creates dummy DeclStmts with one Decl per statement, and it has to do so from last to first in order to build the graph correctly. llvm-svn: 160560
* Fixes an ObjC++ parse crash caused by delayed parsingFariborz Jahanian2012-07-201-1/+4
| | | | | | | | of c-functions nested in namespace in method implementations by turning off its delayed parsing until a proper solution is figured out. pr13418 llvm-svn: 160552
* CommentBriefParser: coding style fixDmitri Gribenko2012-07-201-2/+1
| | | | llvm-svn: 160551
* CommentBriefParser: use \returns if we can't find the \brief or just a plainDmitri Gribenko2012-07-201-6/+21
| | | | | | paragraph. llvm-svn: 160550
* Revert r160319, it caused PR13417. Add a test for PR13417.Nico Weber2012-07-201-26/+27
| | | | llvm-svn: 160542
* Let Expr::HasSideEffects() return false for NULL, bool literals, this, and ↵Nico Weber2012-07-201-0/+6
| | | | | | | | nullptr. Fixes PR13413, -Wunused-private-field now warns on unused fields initialized to NULL. llvm-svn: 160541
* [analyzer] Refactor VisitObjCMessage and VisitCallExpr to rely on theAnna Zaks2012-07-194-86/+85
| | | | | | same implementation for call evaluation. llvm-svn: 160530
* Remove HasSynthBitfield and all callers/writers/etc. Also removeEric Christopher2012-07-195-24/+4
| | | | | | | | previous ResetObjCLayout calls since this is now handled in Sema. Part of rdar://11842763 llvm-svn: 160527
* Reset the layout of an ObjC class if we see an ivar in a categoryEric Christopher2012-07-191-0/+17
| | | | | | | | or implementation since we've now got a different layout. Fixes rdar://11842763 llvm-svn: 160526
* Removing a spurious comment, no functionality changes.Aaron Ballman2012-07-191-5/+0
| | | | llvm-svn: 160522
* CommentDumper: print word-like arguments for block commands.Dmitri Gribenko2012-07-191-0/+2
| | | | llvm-svn: 160519
* For varargs, diagnose passing ObjC objects by value like other non-POD types.Jordan Rose2012-07-192-41/+56
| | | | | | | | | | | | | | While we still want to consider this a hard error (non-POD variadic args are normally a DefaultError warning), delaying the diagnostic allows us to give better error messages, which also match the usual non-POD errors more closely. In addition, this change improves the diagnostic messages for format string argument type mismatches by passing down the type of the callee, so we can say "variadic method" or "variadic function" appropriately. <rdar://problem/11825593> llvm-svn: 160517
* Don't crash checking a format string if one of the arguments is invalid.Jordan Rose2012-07-191-7/+20
| | | | | | | | | Previously, we would ask for the SourceLocation of an argument even if it were NULL (i.e. if Sema resulted in an ExprError trying to build it). <rdar://problem/11890818> llvm-svn: 160515
* Simplify UninitializedValues.cpp by removing logic to handle the previous ↵Ted Kremenek2012-07-191-142/+25
| | | | | | | | (imprecise) representation of '&&' and '||' in the CFG. This is no longer needed, and greatly simplifies the code. llvm-svn: 160494
* Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.Bob Wilson2012-07-193-7/+12
| | | | | | | This macro was being unconditionally set to zero, preceded by a FIXME comment. This fixes <rdar://problem/11845441>. Patch by Michael Gottesman! llvm-svn: 160491
* Relaxed enumeration constant naming rules for scoped enumerators so they no ↵Aaron Ballman2012-07-191-6/+12
| | | | | | longer emit a diagnostic when the enumeration's name matches that of the class. Fixes PR13128. llvm-svn: 160490
* Silence another GCC warning.Richard Smith2012-07-191-1/+1
| | | | llvm-svn: 160488
* Force the OS X version to 10.6 for old-style simulator builds.Bob Wilson2012-07-191-0/+5
| | | | | | | | | | | | | The hack of recognizing a -D__IPHONE_OS_VERSION_MIN_REQUIRED option in place of -mios-simulator-version-min leaves the Darwin version unspecified. It can be set separately with -mmacosx-version-min (which makes no sense) or inferred to match the host version (which is unpredictable and usually wrong). This really needs to get cleaned up, but in the meantime, force the OS X version to 10.6 so that the behavior is sane for the iOS simulator. Thanks for Argyrios for the patch. <rdar://problem/11858187> llvm-svn: 160484
* 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
OpenPOWER on IntegriCloud