summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Use MapVector::pop_back() per LLVM r175538.Douglas Gregor2013-02-191-1/+1
| | | | llvm-svn: 175539
* [docs] Rename to permit wider variety of content.Sean Silva2013-02-192-4/+4
| | | | | | | | | | | I don't want to rule out the possibility of linking to e.g. interesting blog posts about uses of Clang, so avoid restricting the content to "projects". This breaks URL compatibility, but this document was committed less than an hour ago so hopefully nobody has linked to it yet. llvm-svn: 175535
* [docs] Revise content on ExternalProjectsUsingClang page.Sean Silva2013-02-191-6/+22
| | | | llvm-svn: 175534
* Correctly format macro with unfinished template declaration.Daniel Jasper2013-02-192-7/+12
| | | | | | | | | We can now format: #define A template <typename T> Before this created a segfault :-/. llvm-svn: 175533
* Support in hasDeclaration for types with getDecl()Edwin Vane2013-02-194-27/+72
| | | | | | | | | | | | Using a new metafunction for detecting the presence of the member 'getDecl' in a type T, added support to hasDeclaration for any such type T. This allows hasDecl() to be replaced and enables several other subclasses of clang::Type to use hasDeclaration. Updated unittests and LibASTMatchersReference.html. Reviewers: klimek llvm-svn: 175532
* [docs] Introduce ExternalProjectsUsingClang.rstSean Silva2013-02-192-0/+57
| | | | | | | | | A couple concrete examples are sure to be a win. If you know of any other external projects using Clang, please let me know! Patch by Laszlo Nagy! (with a title tweak by me) llvm-svn: 175529
* [Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, ↵Alexey Samsonov2013-02-192-0/+21
| | | | | | make Clang look for the default sanitizer-specific blacklist in the resource directory. llvm-svn: 175505
* Add the missing 'static' keyword to the testTimur Iskhodzhanov2013-02-191-2/+2
| | | | llvm-svn: 175502
* Fix bug in LineState comparison function.Daniel Jasper2013-02-191-13/+13
| | | | | | | | | | | | | | The key bug was if (Other.StartOfLineLevel < StartOfLineLevel) .. instead of if (Other.StartOfLineLevel != StartOfLineLevel) .. Also cleaned up the function to be more consistent in the comparisons. llvm-svn: 175500
* More grammar.Eric Christopher2013-02-191-1/+1
| | | | llvm-svn: 175492
* Fixing a typo where FixIts was accidentally self-assigning instead of ↵Aaron Ballman2013-02-191-1/+1
| | | | | | assigning in the parameter Fixits. This fixes several failed assertions with MSVC debug builds. llvm-svn: 175483
* Add support for -fvisibility-ms-compat.John McCall2013-02-198-23/+214
| | | | | | | | | | | | | | | We treat this as an alternative to -fvisibility=<?> which changes the default value visibility to "hidden" and the default type visibility to "default". Expose a -cc1 option for changing the default type visibility, repurposing -fvisibility as the default value visibility option (also setting type visibility from it in the absence of a specific option). rdar://13079314 llvm-svn: 175480
* Use the actual class visibility for the ObjC EHTYPE global,John McCall2013-02-192-1/+28
| | | | | | | | not the global visibility mode. Noticed by inspection. llvm-svn: 175479
* Temporarily revert r175471 for more review.Bill Wendling2013-02-191-3/+0
| | | | llvm-svn: 175477
* Add a 'no-builtin' attribute if we do not want to simplify calls.Bill Wendling2013-02-181-0/+3
| | | | llvm-svn: 175471
* Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments.David Blaikie2013-02-184-13/+15
| | | | | | | Also removes some redundant DNI comments on function declarations already using the macro. llvm-svn: 175465
* Replace TypeLoc llvm::cast support to be well-defined.David Blaikie2013-02-1829-221/+245
| | | | | | | | | | | | | | The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. llvm-svn: 175462
* libclang: don't store nul-terminated strings as StringRefs,Dmitri Gribenko2013-02-182-16/+15
| | | | | | | | | | if the nul-terminatedness property is important for clients. Also, don't return the same CXString multiple times. This did not create a correctness issue in practice because the CXString was of an CXS_Unmanaged kind, and destruction was a no-op. llvm-svn: 175455
* Clean up last use of dyn_cast on TypeLoc in ASTMatchersDavid Blaikie2013-02-182-8/+8
| | | | llvm-svn: 175454
* Test for my last patch. // rdar://13178483Fariborz Jahanian2013-02-181-0/+29
| | | | llvm-svn: 175453
* Add include guards for CommentVisitor.hArgyrios Kyrtzidis2013-02-181-0/+4
| | | | llvm-svn: 175451
* Prevent crash on multiple user errors (which I cannot reproduce inFariborz Jahanian2013-02-181-0/+4
| | | | | | a small test case). // rdar://13178483. llvm-svn: 175450
* CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.Douglas Gregor2013-02-182-4/+16
| | | | llvm-svn: 175448
* Ensure that the identifier chains have the most recent declaration after ↵Douglas Gregor2013-02-188-28/+106
| | | | | | | | | | | | | | | | | | | | | | | | | module deserialization. This commit introduces a set of related changes to ensure that the declaration that shows up in the identifier chain after deserializing declarations with a given identifier is, in fact, the most recent declaration. The primary change involves waiting until after we deserialize and wire up redeclaration chains before updating the identifier chains. There is a minor optimization in here to avoid recursively deserializing names as part of looking to see whether top-level declarations for a given name exist. A related change that became suddenly more urgent is to property record a merged declaration when an entity first declared in the current translation unit is later deserialized from a module (that had not been loaded at the time of the original declaration). Since we key off the canonical declaration (which is parsed, not from an AST file) for emitted redeclarations, we simply record this as a merged declaration during AST writing and let the readers merge them. Re-fixes <rdar://problem/13189985>, presumably for good this time. llvm-svn: 175447
* Improve indentation of builder type calls.Daniel Jasper2013-02-183-2/+12
| | | | | | | | | | | | | | | | | | | | | | | In builder-type calls, it can be very confusing to just indent parameters from the start of the line. Instead, indent 4 from the correct function call. Before: aaaaaaaaaaaaaaaaaaa()->aaaaaa(bbbbb)->aaaaaaaaaaaaaaaaaaa( // break aaaaaaaaaaaaaa); aaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaa = aaaaaa->aaaaaaaaaaaa()->aaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) ->aaaaaaaaaaaaaaaaa(); After: aaaaaaaaaaaaaaaaaaa()->aaaaaa(bbbbb)->aaaaaaaaaaaaaaaaaaa( // break aaaaaaaaaaaaaa); aaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaa = aaaaaa->aaaaaaaaaaaa() ->aaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) ->aaaaaaaaaaaaaaaaa(); llvm-svn: 175444
* Improve formatting of builder-type calls.Daniel Jasper2013-02-182-1/+5
| | | | | | | | | | | | | Before: aaaaaaa->aaaaaaa->aaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)->aaaaaaaa(aaaaaaaaaaaaaaa); After: aaaaaaa->aaaaaaa ->aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) ->aaaaaaaa(aaaaaaaaaaaaaaa); llvm-svn: 175441
* Reformat lines if they were "moved around".Daniel Jasper2013-02-182-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | An unwrapped line can get moved around if there is no newline before it and the previous line was formatted. Example: template<typename T> // Cursor is on this line when hitting "format" T *getFETokenInfo() const { return static_cast<T*>(FETokenInfo); } "return .." is the second unwrapped line in this scenario. I does not touch any reformatted region. Thus, the result of formatting is: template <typename T> T *getFETokenInfo() const { return static_cast<T *>(FETokenInfo); } After second format (and arguably desired end-result): template <typename T> T *getFETokenInfo() const { return static_cast<T *>(FETokenInfo); } This fixes: llvm.org/PR15060. llvm-svn: 175440
* Correctly determine */& usage in more cases.Daniel Jasper2013-02-182-0/+11
| | | | | | | | | | | | | | This fixes llvm.org/PR15248. Before: Test::Test(int b) : a(b *b) {} for (int i = 0; i < a *a; ++i) {} After: Test::Test(int b) : a(b * b) {} for (int i = 0; i < a * a; ++i) {} llvm-svn: 175439
* AArch64: add atomic support parameters to TargetInfoTim Northover2013-02-182-0/+9
| | | | | | | | This allows Clang to detect and deal wih __atomic_* operations properly on AArch64. Previously we produced an error when encountering them at high optimisation levels. llvm-svn: 175438
* Always break after multi-line string literals.Daniel Jasper2013-02-182-177/+228
| | | | | | | | | | | | | | | | Otherwise, other parameters can be quite hidden. Reformatted unittests/Format/FormatTest.cpp after this. Before: someFunction("Always break between multi-line" " string literals", and, other, parameters); After: someFunction("Always break between multi-line" " string literals", and, other, parameters); llvm-svn: 175436
* Prevent line breaks that make stuff hard to read.Daniel Jasper2013-02-182-0/+22
| | | | | | | | | | | | | | | | Before: aaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: aaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa) .aaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 175432
* Update test cases to account for DIBuilder type changes.David Blaikie2013-02-182-2/+2
| | | | | | Paired commit with LLVM, may produce temporary build breakage. llvm-svn: 175427
* Disable dead stores checker for template instantations. Fixes ↵Ted Kremenek2013-02-182-0/+27
| | | | | | <rdar://problem/13213575>. llvm-svn: 175425
* Fix up grammar a bit.Eric Christopher2013-02-181-2/+2
| | | | llvm-svn: 175418
* Unify some "kernel or kext" conditionals.Eric Christopher2013-02-181-5/+3
| | | | llvm-svn: 175414
* Add a comment.Eric Christopher2013-02-181-0/+1
| | | | llvm-svn: 175412
* Clean up comment.Eric Christopher2013-02-181-1/+1
| | | | llvm-svn: 175411
* Grammar.Eric Christopher2013-02-181-1/+1
| | | | llvm-svn: 175410
* Unify some code. No functional change.Eric Christopher2013-02-181-9/+3
| | | | llvm-svn: 175409
* Test ivar-invariant.m: use a more idiomatic RUN line and tighten the testDmitri Gribenko2013-02-171-1/+4
| | | | | | by matching the function name first llvm-svn: 175395
* Remove block names from test case to unbreak release builds.Lang Hames2013-02-171-2/+0
| | | | | | Thanks Chandler. :) llvm-svn: 175392
* Documentation: use \brief and don't duplicate the name of the declared entityJames Dennett2013-02-171-4/+3
| | | | | | at the start of the doc comment. llvm-svn: 175391
* Documentation cleanup: fix a typo ("////" for "///") and suppress Doxygen'sJames Dennett2013-02-171-2/+2
| | | | | | automatic link generation for "file:", as it's not used as a URL here. llvm-svn: 175390
* Re-apply r174919 - smarter copy/move assignment/construction, with fixes forLang Hames2013-02-177-11/+602
| | | | | | | | | | | bitfield related issues. The original commit broke Takumi's builder. The bug was caused by bitfield sizes being determined by their underlying type, rather than the field info. A similar issue with bitfield alignments showed up on closer testing. Both have been fixed in this patch. llvm-svn: 175389
* [clang] fix test execution commandSaleem Abdulrasool2013-02-171-1/+1
| | | | | Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175387
* [CodeGen] tighten objc ivar invariant.load attributionSaleem Abdulrasool2013-02-172-4/+78
| | | | | | | | | | | | | | | | | An ivar ofset cannot be marked as invariant load in all cases. The ivar offset is a lazily initialised constant, which is dependent on an objc_msgSend invocation to perform a fixup of the offset. If the load is being performed on a method implemented by the class then this load can safely be marked as an inviarant because a message must have been passed to the class at some point, forcing the ivar offset to be resolved. An additional heuristic that can be used to identify an invariant load would be if the ivar offset base is a parameter to an objc method. However, without the parameters available at hand, this is currently not possible. Reviewed-by: John McCall <rjmccall@apple.com> Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175386
* Fix for ARM: functions don't have extra attributes there, so {{.*}} is ""Dmitri Gribenko2013-02-171-3/+7
| | | | | | While there, explicitly declare functions to remove warnings. llvm-svn: 175384
* Use trailing documentation comments properlyDmitri Gribenko2013-02-164-15/+16
| | | | | | Patch by Alexander Zinenko. llvm-svn: 175376
* Use the correct type to hold enumeration valuesDmitri Gribenko2013-02-161-2/+2
| | | | llvm-svn: 175374
* Documentation cleanup: make a \brief be brief, and fix a bad use of \see.James Dennett2013-02-161-2/+3
| | | | llvm-svn: 175340
OpenPOWER on IntegriCloud