summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [ms-inline asm] Add comments.Chad Rosier2012-08-221-1/+6
| | | | llvm-svn: 162394
* [ms-inline asm] Add helper function. No functional change intended.Chad Rosier2012-08-221-2/+7
| | | | llvm-svn: 162393
* [ms-inline asm] Simplify logic. No functional change intended.Chad Rosier2012-08-221-7/+2
| | | | llvm-svn: 162392
* Reverted clang-check to fully supported CommandLine Library use-case: globalAlexander Kornienko2012-08-222-32/+31
| | | | | | static variables. llvm-svn: 162391
* [ms-inline asm] Compute the token range for each instruction within the asm.Chad Rosier2012-08-221-4/+9
| | | | | | | Eventually, we'll need a way of mapping tokens (and their IdentifierInfo*) to the operands computed by buildMSAsmPieces(). llvm-svn: 162388
* Despite me asking Jordan to do r162313, revert it. We can provideTed Kremenek2012-08-222-30/+30
| | | | | | another way to whitelist these special cases. This is an intermediate patch. llvm-svn: 162386
* [ms-inline asm] Simplify logic. No functional change intended.Chad Rosier2012-08-221-5/+11
| | | | llvm-svn: 162385
* Remove BasicConstraintManager. It hasn't been in active service for a while.Ted Kremenek2012-08-222-447/+1
| | | | | | | | As part of this change, I discovered that a few of our tests were not testing the RangeConstraintManager. Luckily all of those passed when I moved them over to use that constraint manager. llvm-svn: 162384
* [ms-inline asm] Start sending non-simple inline asms to the AsmParser.Chad Rosier2012-08-222-17/+27
| | | | | | | The parser still can't handle all cases, so fall back to emitting a simple MSAsmStmt if we get into trouble. llvm-svn: 162382
* ASTContext::getCommentForDecl: add comment.Dmitri Gribenko2012-08-221-0/+4
| | | | llvm-svn: 162374
* Attaching comments to declarations: when documentation is requested for anDmitri Gribenko2012-08-221-5/+62
| | | | | | implicit instantiation, look for documentation attached to the template. llvm-svn: 162371
* Reduce duplicated hash map lookups.Benjamin Kramer2012-08-225-23/+11
| | | | llvm-svn: 162361
* Merge existing attributes before processing pragmas in friend templateRafael Espindola2012-08-221-2/+3
| | | | | | | declarations. Fixes pr13662. llvm-svn: 162360
* Fix typo in debug method.Benjamin Kramer2012-08-221-1/+1
| | | | llvm-svn: 162352
* Rename 'unbindLoc()' (in ProgramState) and 'Remove()' toTed Kremenek2012-08-223-9/+15
| | | | | | | | | 'killBinding()'. The name is more specific, and one just forwarded to the other. Add some doxygen comments along the way. llvm-svn: 162350
* Rename 'currentX' to 'currX' throughout analyzer and libAnalysis.Ted Kremenek2012-08-2211-117/+106
| | | | | | | | | Also rename 'getCurrentBlockCounter()' to 'blockCount()'. This ripples a bunch of code simplifications; mostly aesthetic, but makes the code a bit tighter. llvm-svn: 162349
* Rename 'getConjuredSymbol*' to 'conjureSymbol*'.Ted Kremenek2012-08-2211-65/+58
| | | | | | | | | | No need to have the "get", the word "conjure" is a verb too! Getting a conjured symbol is the same as conjuring one up. This shortening is largely cosmetic, but just this simple changed cleaned up a handful of lines, making them less verbose. llvm-svn: 162348
* Remove Store::bindDecl() and Store::bindDeclWithNoInit(), andTed Kremenek2012-08-224-48/+23
| | | | | | | | all forwarding methods. This functionality is already covered by bindLoc(). llvm-svn: 162346
* Rename 'BindCompoundLiteral' to 'bindCompoundLiteral' andTed Kremenek2012-08-222-5/+15
| | | | | | add doxygen comments. llvm-svn: 162345
* Remove stale header file.Ted Kremenek2012-08-221-1/+0
| | | | llvm-svn: 162341
* Consilidate SmallPtrSet count() followed by insert() into a single insert().Ted Kremenek2012-08-221-6/+2
| | | | llvm-svn: 162330
* [ms-inline asm] Remove the patchMSAsmStrings function. After some discussionChad Rosier2012-08-211-134/+17
| | | | | | | between Bob, Jim, Eric and I, we've decided to take a slightly different approach. llvm-svn: 162327
* Add an llvm_unreachable to pacify GCC's -Wreturn-type.Matt Beaumont-Gay2012-08-211-0/+1
| | | | llvm-svn: 162325
* [ms-inline asm] Have buildMSAsmString build a vector of unmodified AsmStrings.Chad Rosier2012-08-211-7/+35
| | | | | | | | | | Add a new static function, buildMSAsmPieces, that will break these strings down into mnemonic and operands. Upon a match failure, the idea is to use the ErrorInfo from MatchInstructionImpl to inspect the mnemonic/operand and decide a course of action. Unfortunately, there's no easy way to test this at the moment. llvm-svn: 162321
* change function name in my last patch.Fariborz Jahanian2012-08-211-3/+3
| | | | | | // rdar://12103400 llvm-svn: 162320
* objective-C: Change rules for overriding properties in Fariborz Jahanian2012-08-211-13/+25
| | | | | | | | | class extensions a little. clang now allows readonly property with no ownership rule (assign, unsafe_unretained, weak, retain, strong, or copy) with a readwrite property with an ownership rule. // rdar://12103400 llvm-svn: 162319
* [analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.Jordan Rose2012-08-212-7/+19
| | | | | | | | | | | | | | | | | | | Under -analyzer-ipa=basic-inlining, only C functions, blocks, and C++ static member functions are inlined -- essentially, the calls that behave like simple C function calls. This is essentially the behavior in Xcode 4.4. C++ support still has some rough edges, and we don't want users to be worried about them if they download and run their own checker. (In particular, the massive number of false positives for analyzing LLVM comes from inlining defensively-written code in contexts where more aggressive assumptions are implicitly made. This problem is not unique to C++, but it is exacerbated by the higher proportion of code that lives in header files in C++.) The eventual goal is to be comfortable enough with C++ support (and simple Objective-C support) to advance to -analyzer-ipa=inlining as the default behavior. See the IPA design notes for more details. llvm-svn: 162318
* CommentBriefParser: allow paragraphs to be separated by line of whitespace.Dmitri Gribenko2012-08-211-5/+38
| | | | | | Skip paragraphs that contain only whitespace. llvm-svn: 162315
* [analyzer] Push "references are non-null" knowledge up to the common parent.Jordan Rose2012-08-213-35/+30
| | | | | | | | | | This reduces duplication across the Basic and Range constraint managers, and keeps their internals free of dealing with the semantics of C++. It's still a little unfortunate that the constraint manager is dealing with this at all, but this is pretty much the only place to put it so that it will apply to all symbolic values, even when embedded in larger expressions. llvm-svn: 162313
* [ms-inline asm] Do not report a Parser error when matching inline assembly.Chad Rosier2012-08-211-1/+2
| | | | llvm-svn: 162307
* Modern objc translator: Fixes a crash in rewriter when rewriting the APIFariborz Jahanian2012-08-211-1/+8
| | | | | | for structure valued method messaging. // rdar://12142241 llvm-svn: 162303
* Use LLVM_BUILTIN_TRAP instead of lame volatile int traps.David Blaikie2012-08-212-2/+2
| | | | | | (from a todo mentioned in r159469 & originally suggested by Chandler Carruth) llvm-svn: 162302
* Reduce the amount of state in the Option class by relying on the data from ↵Michael J. Spencer2012-08-212-67/+18
| | | | | | OptTable::Info. llvm-svn: 162299
* Switch some realignment calculations over to llvm::RoundUpToAlignment.Richard Smith2012-08-211-2/+1
| | | | llvm-svn: 162297
* [ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,Chad Rosier2012-08-211-1/+3
| | | | | | this is the index of the operand that failed to match. llvm-svn: 162296
* DeclPrinter, terse mode: don't print function bodiesDmitri Gribenko2012-08-211-1/+1
| | | | llvm-svn: 162294
* Rename PrintingPolicy::DontRecurseInDeclContext to PrintingPolicy::TerseOutputDmitri Gribenko2012-08-211-1/+1
| | | | | | to reflect the intention, not the implementation. llvm-svn: 162293
* [ms-inline asm] Append identifier for better debugging.Chad Rosier2012-08-211-0/+1
| | | | llvm-svn: 162289
* [ms-inline asm] Remove this test case and the associated special case code.Chad Rosier2012-08-211-6/+0
| | | | llvm-svn: 162288
* [driver] Add support for the --param ssp-buffer-size= driver option.Chad Rosier2012-08-213-0/+15
| | | | | | PR9673 llvm-svn: 162285
* [asan] If we are compiling with ASan, add metadata indicating dynamically ↵Kostya Serebryany2012-08-211-0/+12
| | | | | | initialized globals. Patch by Reid Watson, reviewed by Richard Smith llvm-svn: 162259
* Fix alignment of array of VarDecl* following array of unsigned in LambdaExpr.Richard Smith2012-08-211-3/+7
| | | | llvm-svn: 162255
* When performing a trivial copy of a C++ type, we must be careful notJohn McCall2012-08-212-2/+23
| | | | | | | | | | | to overwrite objects that might have been allocated into the type's tail padding. This patch is missing some potential optimizations where the destination is provably a complete object, but it's necessary for correctness. Patch by Jonathan Sauer. llvm-svn: 162254
* Avoid binding a reference to a dereferenced pointer in diagnostic serializationRichard Smith2012-08-211-92/+133
| | | | | | | | | | | if a diagnostic is emitted outside of any source file. The fix mirrors the corresponding code in TextDiagnosticPrinter. This required moving the functional parts of SDiagRenderer into SDiagWriter so they can be reused in the non-rendering codepath. No functionality change. llvm-svn: 162253
* Screw around with ObjCRuntime some more, changing theJohn McCall2012-08-2113-30/+67
| | | | | | | | diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW. llvm-svn: 162252
* Better diagnostics for range-based for loops with bad range types.Sam Panzer2012-08-214-171/+336
| | | | | | | | | | | | | The old error message stating that 'begin' was an undeclared identifier is replaced with a new message explaining that the error is in the range expression, along with which of the begin() and end() functions was problematic if relevant. Additionally, if the range was a pointer type or defines operator*, attempt to dereference the range, and offer a FixIt if the modified range works. llvm-svn: 162248
* [analyzer] Assume that reference symbols are non-null.Jordan Rose2012-08-212-1/+15
| | | | | | | | By doing this in the constraint managers, we can ensure that ANY reference whose value we don't know gets the effect, even if it's not a top-level parameter. llvm-svn: 162246
* DeclPrinter: add terse output mode and lots of testsDmitri Gribenko2012-08-201-0/+3
| | | | | | | | | | | | | | Add a flag PrintingPolicy::DontRecurseInDeclContext to provide "terse" output from DeclPrinter. The motivation is to use DeclPrinter to print declarations in user-friendly format, without overwhelming user with inner detail of the declaration being printed. Also add many tests for DeclPrinter. There are quite a few things that we print incorrectly: search for WRONG in DeclPrinterTest.cpp -- and these tests check our output against incorrect output, so that we can fix/refactor/rewrite the DeclPrinter later. llvm-svn: 162245
* Fix a pair of bugs relating to properties in ARC.John McCall2012-08-202-2/+28
| | | | | | | | | | | | | | | | | | | | First, when synthesizing an explicitly strong/retain/copy property of Class type, don't pretend during compatibility checking that the property is actually assign. Instead, resolve incompatibilities by secretly changing the type of *implicitly* __unsafe_unretained Class ivars to be strong. This is moderately evil but better than what we were doing. Second, when synthesizing the setter for a strong property of non-retainable type, be sure to use objc_setProperty. This is possible when the property is decorated with the NSObject attribute. This is an ugly, ugly corner of the language, and we probably ought to deprecate it. The first is rdar://problem/12039404; the second was noticed by inspection while fixing the first. llvm-svn: 162244
* Reapply:Eric Christopher2012-08-202-14/+31
| | | | | | | | | | | | | | | Author: Eric Christopher <echristo@apple.com> Date: Thu Aug 16 23:50:46 2012 +0000 Add some caching here for the builtin types. rdar://12117935 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162066 91177308-0d34-0410-b5e6-96231b3b80d8 after fixing a thinko. llvm-svn: 162243
OpenPOWER on IntegriCloud