summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Keep the parentheses in #pragma message (partial revert of r179771).Andy Gibbs2013-04-193-4/+6
| | | | llvm-svn: 179862
* C++11 support is now feature-complete.Richard Smith2013-04-196-7/+51
| | | | llvm-svn: 179861
* Avoid names like __in that conflict with SAL in builtin headersReid Kleckner2013-04-193-37/+36
| | | | | | | | | | | | | | Microsoft's Source Annotation Language (SAL) defines a bunch of keywords for annotating the inputs and outputs of functions. Empty definitions for the keywords are provided by <stdlib.h> -> <crtdefs.h> -> <sal.h>. This makes it basically impossible to include MSVC's stdlib.h and Clang's *mmintrin.h headers at the same time if they have variables named __in. As a workaround, I've renamed those variables. This fixes the Modules/compiler_builtins.m test which was XFAILed, presumably due to this conflict. llvm-svn: 179860
* Implement CodeGen for C++11 thread_local, following the Itanium ABI ↵Richard Smith2013-04-1912-13/+425
| | | | | | specification as discussed on cxx-abi-dev. llvm-svn: 179858
* [analyzer] Call proper callback for const regions escaped other then on call.Anton Yartsev2013-04-191-1/+2
| | | | llvm-svn: 179846
* Revert "PR14606: Debug info for using directives/DW_TAG_imported_module"Eric Christopher2013-04-194-25/+3
| | | | | | This reverts commit r179837 as it seems to be causing test failures. llvm-svn: 179839
* PR14606: Debug info for using directives/DW_TAG_imported_moduleDavid Blaikie2013-04-194-3/+25
| | | | | | More changes later for using declarations/DW_TAG_imported_declaration. llvm-svn: 179837
* Give CGDebugInfo::getContextDescriptor a more specific return typeDavid Blaikie2013-04-192-10/+7
| | | | | | | Not that the DI* hierarchy is terribly type safe, but this makes the contract a little clearer I think. llvm-svn: 179835
* [libclang] Fix copy-paste error in comment.Argyrios Kyrtzidis2013-04-191-1/+1
| | | | llvm-svn: 179823
* [libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the ↵Argyrios Kyrtzidis2013-04-185-2/+24
| | | | | | | | given cursor is a variadic function or method. rdar://13667150 llvm-svn: 179819
* Objective-C++: Enable passing of modern C++11 style Fariborz Jahanian2013-04-182-1/+46
| | | | | | | initialized temporaries to objc++ methods. // rdar://12788429 llvm-svn: 179818
* [libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC ↵Argyrios Kyrtzidis2013-04-185-0/+67
| | | | | | | | | | Qualifiers' written next to the return and parameter types in an ObjC method declarations. rdar://13676977 llvm-svn: 179816
* Fix typo.Chad Rosier2013-04-181-1/+1
| | | | llvm-svn: 179811
* Add comment to describe cleverness.Benjamin Kramer2013-04-181-0/+2
| | | | llvm-svn: 179806
* [libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the ↵Argyrios Kyrtzidis2013-04-187-8/+89
| | | | | | | | written attributes in a property declaration. rdar://13684512 llvm-svn: 179803
* Comment parsing: simplify code. As a side effect, this also silences GCC'sDmitri Gribenko2013-04-181-14/+10
| | | | | | | | -Wunitnitialized warning. Patch by Rui Ueyama. llvm-svn: 179794
* Objective-C parsing [qoi]: Provide good recovery whenFariborz Jahanian2013-04-182-1/+11
| | | | | | | Objective-C dictionary literals has bad syntax for the separator. // rdar://10679157 llvm-svn: 179784
* [CMake] Create the directory before creating the link to the clang headers.Argyrios Kyrtzidis2013-04-181-0/+1
| | | | llvm-svn: 179782
* some more tests for r179743.Argyrios Kyrtzidis2013-04-181-0/+35
| | | | llvm-svn: 179781
* Add IRGen test case for r179743.Argyrios Kyrtzidis2013-04-181-1/+27
| | | | llvm-svn: 179777
* [analyzer] Refine 'nil receiver' diagnostics to mention the name of the ↵Ted Kremenek2013-04-183-6/+267
| | | | | | method not called. llvm-svn: 179776
* Dropped the parentheses for #pragma message and its kin in the -E output ↵Andy Gibbs2013-04-183-6/+23
| | | | | | | | generator. This was a suggestion by Jordan Rose since the documented format for these pragmas is without the parentheses. At the same time, I've increased test coverage too for the preprocessed output. llvm-svn: 179771
* Adds a new doxygen tag needed. // rdar://12379053Fariborz Jahanian2013-04-182-0/+38
| | | | llvm-svn: 179770
* [libclang] Report parameter array types as written in source, not decayed to ↵Argyrios Kyrtzidis2013-04-183-5/+16
| | | | | | | | | pointer types. Patch by Doug. rdar://13684618 llvm-svn: 179769
* [analyzer] "Force" LazyCompoundVals on bind when they are simple enough.Jordan Rose2013-04-184-9/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The analyzer uses LazyCompoundVals to represent rvalues of aggregate types, most importantly structs and arrays. This allows us to efficiently copy around an entire struct, rather than doing a memberwise load every time a struct rvalue is encountered. This can also keep memory usage down by allowing several structs to "share" the same snapshotted bindings. However, /lookup/ through LazyCompoundVals can be expensive, especially since they can end up chaining back to the original value. While we try to reuse LazyCompoundVals whenever it's safe, and cache information about this transitivity, the fact is it's sometimes just not a good idea to perpetuate LazyCompoundVals -- the tradeoffs just aren't worth it. This commit changes RegionStore so that binding a LazyCompoundVal to struct will do a memberwise copy if the struct is simple enough. Today's definition of "simple enough" is "up to N scalar members" (see below), but that could easily be changed in the future. This is enough to bring the test case in PR15697 back down to a manageable analysis time (within 20% of its original time, in an unfair test where the new analyzer is not compiled with LTO). The actual value of "N" is controlled by a new -analyzer-config option, 'region-store-small-struct-limit'. It defaults to "2", meaning structs with zero, one, or two scalar members will be considered "simple enough" for this code path. It's worth noting that a more straightforward implementation would do this on load, not on bind, and make use of the structure we already have for this: CompoundVal. A long time ago, this was actually how RegionStore modeled aggregate-to-aggregate copies, but today it's only used for compound literals. Unfortunately, it seems that we've special-cased LazyCompoundVal in certain places (such as liveness checks) but failed to similarly special-case CompoundVal in all of them. Until we're confident that CompoundVal is handled properly everywhere, this solution is safer, since the entire optimization is just an implementation detail of RegionStore. <rdar://problem/13599304> llvm-svn: 179767
* [analyzer] Don't crash if we cache out after making a temporary region.Jordan Rose2013-04-182-1/+41
| | | | | | | | | | | | | | A C++ overloaded operator may be implemented as an instance method, and that instance method may be called on an rvalue object, which has no associated region. The analyzer handles this by creating a temporary region just for the evaluation of this call; however, it is possible that /by creating the region/, the analyzer ends up in a previously-explored state. In this case we don't need to continue along this path. This doesn't actually show any behavioral change now, but it starts being used with the next commit and prevents an assertion failure there. llvm-svn: 179766
* Specify that we're parsing ms-style inline assembly.Chad Rosier2013-04-181-1/+1
| | | | llvm-svn: 179762
* Multiple improvements to the AST matcher tutorial.Manuel Klimek2013-04-181-29/+44
| | | | | | Patch by Jochen Eisinger. llvm-svn: 179758
* Reject asm output constraints that consist of modifiers only.Benjamin Kramer2013-04-182-1/+17
| | | | | | Fixes PR15759. llvm-svn: 179756
* Add llvm_unreachable at end of fully covered switch to pacify GCC.Benjamin Kramer2013-04-181-0/+1
| | | | llvm-svn: 179753
* [Parser] Handle #pragma pack/align inside C structs.Argyrios Kyrtzidis2013-04-183-0/+36
| | | | | | Fixes PR13580. Patch by Serge Pavlov! llvm-svn: 179743
* Switch the note order for -Woverloaded-shift-op-parentheses so that the noteRichard Trieu2013-04-182-12/+16
| | | | | | | with the silence fix-it comes first. This is more consistent with the rest of the warnings in -Wparentheses. llvm-svn: 179742
* Update the -Wparentheses tests to check that fix-its are in the correct place.Richard Trieu2013-04-182-33/+118
| | | | llvm-svn: 179740
* [analyzer] Tweak getDerefExpr more to track DeclRefExprs to references.Anna Zaks2013-04-183-2/+232
| | | | | | | | | | | In the committed example, we now see a note that tells us when the pointer was assumed to be null. This is the only case in which getDerefExpr returned null (failed to get the dereferenced expr) throughout our regression tests. (There were multiple occurrences of this one.) llvm-svn: 179736
* [analyzer] Improve dereferenced expression tracking for MemberExpr with a ↵Anna Zaks2013-04-172-0/+278
| | | | | | dot and non-reference base llvm-svn: 179734
* Add description of -Ofast optimization option to the man page. <rdar://13660458>Bob Wilson2013-04-171-3/+5
| | | | llvm-svn: 179733
* [analyzer] Gain more precision retrieving the right SVal by specifying the ↵Anna Zaks2013-04-172-1/+157
| | | | | | | | type of the expression. Thanks to Jordan for suggesting the fix. llvm-svn: 179732
* [analyzer] Allow TrackConstraintBRVisitor to work when the value it’s ↵Anna Zaks2013-04-173-5/+367
| | | | | | | | | | tracking is not live in the last node of the path We always register the visitor on a node in which the value we are tracking is live and constrained. However, the visitation can restart at a node, later on the path, in which the value is under constrained because it is no longer live. Previously, we just silently stopped tracking in that case. llvm-svn: 179731
* [Modules] Use global index to improve typo correction performanceArgyrios Kyrtzidis2013-04-176-4/+43
| | | | | | | | | Typo correction for an unqualified name needs to walk through all of the identifier tables of all modules. When we have a global index, just walk its identifier table only. rdar://13425732 llvm-svn: 179730
* Add support for gcc's spelling of -fcolor-diagnostics.Nico Weber2013-04-173-3/+92
| | | | | | See http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html llvm-svn: 179728
* [tests] Only include stdint.h if we are in freestanding mode.Daniel Dunbar2013-04-171-1/+1
| | | | | | | - We shouldn't even try to include stdint.h in hosted mode, as the dependency on even parsing a platforms stdint.h might fail for some targets. llvm-svn: 179723
* [document parsing]: When tag declaration (but not definition!) Fariborz Jahanian2013-04-172-1/+91
| | | | | | | is part of the decl-specifier-seq of some other declaration, it doesn't get comment. // rdar://12390371 llvm-svn: 179722
* Test cases for r179719.Chad Rosier2013-04-171-0/+6
| | | | llvm-svn: 179720
* Fix off-by-one error in #pragma clang system_header.Jordan Rose2013-04-173-8/+10
| | | | | | | | | | | The system_header pragma (from GCC) is implemented using line notes in the source manager. However, a line note's line number specifies the number not for the current line, but for the next line. This was making all line numbers appear off by one after the pragma. Reported by Andy Gibbs, uncovered during r179677. llvm-svn: 179709
* PR15755: don't drop parameter packs when dropping parameters with defaultRichard Smith2013-04-172-7/+23
| | | | | | arguments in the formation of a candidate set of inheriting constructors. llvm-svn: 179708
* Sema: Remove unused variable.Benjamin Kramer2013-04-171-4/+0
| | | | llvm-svn: 179701
* [analyzer] Don't warn for returning void expressions in void blocks.Jordan Rose2013-04-173-4/+40
| | | | | | | | | | | This was slightly tricky because BlockDecls don't currently store an inferred return type. However, we can rely on the fact that blocks with inferred return types will have return statements that match the inferred type. <rdar://problem/13665798> llvm-svn: 179699
* Unified token breaking logic: support for line comments.Alexander Kornienko2013-04-177-225/+218
| | | | | | | | | | | | | | | | | | | Summary: Added BreakableLineComment, moved common code from BreakableBlockComment to newly added BreakableComment. As a side-effect of the rewrite, found another problem with escaped newlines and had to change code which removes trailing whitespace from line comments not to break after this patch. Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D682 llvm-svn: 179693
* Revert r179671 and just pass a triple to the test for a platform with knownEric Christopher2013-04-172-6/+1
| | | | | | TLS support. llvm-svn: 179692
* DR974: Lambdas can have default arguments.Richard Smith2013-04-175-22/+6
| | | | llvm-svn: 179688
OpenPOWER on IntegriCloud