summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Change the color of comment nodes from bright yellow to blue. Bright yellow onRichard Trieu2014-03-062-20/+31
| | | | | | | | a white background is difficult to read. Also include a chart showing which colors are used by which elements in the AST dump. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203050 91177308-0d34-0410-b5e6-96231b3b80d8
* [Layering] Update include of DebugInfo.h which moved to the IR libraryChandler Carruth2014-03-061-1/+1
| | | | | | in LLVM r203046. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203047 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C properties. Fixes a crash in Sema where RHS ofFariborz Jahanian2014-03-062-4/+60
| | | | | | | | the property assignment is an lvalue for an incomplete type. // rdar://15118128. Reviewed offline by John McCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203043 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to an idiomatic C++ erase/remove for this loop, and fix a bug in theRichard Smith2014-03-061-3/+5
| | | | | | | | process (I don't believe it's possible to write a testcase for the bug with a non-checking STL implementation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203042 91177308-0d34-0410-b5e6-96231b3b80d8
* [Layering] Update include for the move of DIBuilder.h to the IR libraryChandler Carruth2014-03-061-1/+1
| | | | | | in LLVM r203038. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203039 91177308-0d34-0410-b5e6-96231b3b80d8
* [-Wunreachable-code] Handle idiomatic do...while() with an uninteresting ↵Ted Kremenek2014-03-062-9/+41
| | | | | | | | | | condition. Sometimes do..while() is used to create a scope that can be left early. In such cases, the unreachable 'while()' test is not usually interesting unless it actually does something that is observable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203036 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/Modules/recursive.c: Tweak expressions for win32.NAKAMURA Takumi2014-03-061-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203034 91177308-0d34-0410-b5e6-96231b3b80d8
* [-Wunreachable-code] generalize pruning out warning on trivial returns.Ted Kremenek2014-03-052-10/+28
| | | | | | | | Previously we only pruned dead returns preceded by a call to a 'noreturn' function. After looking at the results of the LLVM codebase, there are many others that should be pruned as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203029 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C. Suppress the warning for auto synthesis of property notFariborz Jahanian2014-03-052-4/+60
| | | | | | | | synthesizing protocol properties if class's super class implements them. // rdar://16089191 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203028 91177308-0d34-0410-b5e6-96231b3b80d8
* [-Wunreachabe-code] add test for double 'break'.Ted Kremenek2014-03-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203027 91177308-0d34-0410-b5e6-96231b3b80d8
* [-Wunreachable-code] include some enum constants in "configuration value" ↵Ted Kremenek2014-03-052-0/+23
| | | | | | heuristic git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203026 91177308-0d34-0410-b5e6-96231b3b80d8
* PR19010: Make sure we initialize (empty) indirect base class subobjects whenRichard Smith2014-03-052-23/+22
| | | | | | | evaluating trivial default initialization of a literal class type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203025 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix recursion bug in logic to validate ↵Ted Kremenek2014-03-052-6/+16
| | | | | | 'objc_protocol_requires_explicit_implementation' conformance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203024 91177308-0d34-0410-b5e6-96231b3b80d8
* DR status page: add link targets for individual DRs, and link duplicates.Richard Smith2014-03-052-1878/+1877
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203022 91177308-0d34-0410-b5e6-96231b3b80d8
* Tests for DR370-380.Richard Smith2014-03-056-17/+125
| | | | | | | | Also promote a couple of Warnings on ill-formed code found by this testing to ExtWarns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203021 91177308-0d34-0410-b5e6-96231b3b80d8
* [-Wunreachable-code] generalize configuration value checking to all ↵Ted Kremenek2014-03-052-1/+9
| | | | | | comparison operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203016 91177308-0d34-0410-b5e6-96231b3b80d8
* Updating this test case to appease build bots which support ANSI escape ↵Aaron Ballman2014-03-051-1/+1
| | | | | | sequences (unlike my dev box). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203014 91177308-0d34-0410-b5e6-96231b3b80d8
* Capabilities are required to pass a name specifying what type of capability ↵Aaron Ballman2014-03-054-2/+20
| | | | | | | | is being annotated. There are currently only two supported names: mutex and role. Adding functionality to check for the capability name and diagnose when it's unexpected. Note that for backwards compatibility, an unnamed capability will default to being a "mutex." This allows the deprecated lockable attribute to continue to function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203012 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to re-enable the VFS unittests on WindowsBen Langmuir2014-03-052-74/+76
| | | | | | | Using a //net/ path to hopefully avoid problems with non-absolute paths on Windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203010 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't produce an alias between destructors with different calling conventions.Rafael Espindola2014-03-052-2/+24
| | | | | | Fixes pr19007. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203007 91177308-0d34-0410-b5e6-96231b3b80d8
* When building a module from the command line via -emit-module, add an entry toRichard Smith2014-03-053-5/+16
| | | | | | | | the module build stack for the module being built, so we can correctly detect recursive module builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203006 91177308-0d34-0410-b5e6-96231b3b80d8
* If a #include finds a file relative to the current file, don't forget to checkRichard Smith2014-03-057-27/+75
| | | | | | | whether it's part of a module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203005 91177308-0d34-0410-b5e6-96231b3b80d8
* Mention clang-cl in MSVCCompatibility.rstNico Weber2014-03-051-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203002 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for llvm change.Rafael Espindola2014-03-051-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203000 91177308-0d34-0410-b5e6-96231b3b80d8
* [code-completion] Add a couple of test cases suggested by Jordan, and a FIXME.Argyrios Kyrtzidis2014-03-051-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202995 91177308-0d34-0410-b5e6-96231b3b80d8
* AST: Remove layering violation with SemaDavid Majnemer2014-03-056-14/+29
| | | | | | | Scope lives in Sema and cannot be used in AST. Shuffle things around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202993 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Using std::unique_ptr to ensure that Argument objects do not leak ↵Aaron Ballman2014-03-051-50/+45
| | | | | | (since clang-tblgen isn't long-lived, the old leak is probably acceptable, but it offended my senses nonetheless). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202989 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ThreadSafeRefCountedBase for vfs::FileSystemBen Langmuir2014-03-051-1/+1
| | | | | | | Allow trivial read-only filesystems such as RealFileSystem to be shared between threads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202986 91177308-0d34-0410-b5e6-96231b3b80d8
* Style fix: replace "1 entries" with "1 entry" in the vftable layout dumping codeTimur Iskhodzhanov2014-03-055-74/+76
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202978 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[C++11] Replace trivial lambda with std::cref."Benjamin Kramer2014-03-051-1/+3
| | | | | | MSVC2013's standard library is too broken to understand this pattern. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202971 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace trivial lambda with std::cref.Benjamin Kramer2014-03-051-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202968 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a const qualifier to SourceManager& parameters.Alexander Kornienko2014-03-052-12/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202964 91177308-0d34-0410-b5e6-96231b3b80d8
* MS ABI: Mangle lambdasDavid Majnemer2014-03-052-1/+50
| | | | | | | | | | | | | | | | | Use a scheme inspired by the Itanium ABI to properly implement the mangling of lambdas. N.B. The incredibly astute observer will notice that we do not generate external names that are identical, or even compatible with, MSVC. This is fine because they don't generate names that they can use across translation units. Technically, we can generate any name we'd like so long as that name wouldn't conflict with any other and would be stable across translation units. This fixes PR15512. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202962 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable BasicTests/VFS on win32 for now. Investigating.NAKAMURA Takumi2014-03-051-0/+2
| | | | | | | | | | | Failing Tests (5): Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.CaseInsensitive Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.MappedFiles Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.MultiComponentPath Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.TrailingSlashes Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.UseExternalName git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202952 91177308-0d34-0410-b5e6-96231b3b80d8
* [-cxx-abi microsoft] Implement local manglings accuratelyDavid Majnemer2014-03-0518-202/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The MSVC ABI appears to mangle the lexical scope into the names of statics. Specifically, a counter is incremented whenever a scope is entered where things can be declared in such a way that an ambiguity can arise. For example, a class scope inside of a class scope doesn't do anything interesting because the nested class cannot collide with another nested class. There are problems with this scheme: - It is unreliable. The counter is only incremented when a previously never encountered scope is entered. There are cases where this will cause ambiguity amongst declarations that have the same name where one was introduced in a deep scope while the other was introduced right after in the previous lexical scope. - It is wasteful. Statements like: {{{{{{{ static int foo = a; }}}}}}} will make the mangling of "foo" larger than it need be because the scope counter has been incremented many times. Because of these problems, and practical implementation concerns. We choose not to implement this scheme if the local static or local type isn't visible. The mangling of these declarations will look very similar but the numbering will make far more sense, this scheme is lifted from the Itanium ABI implementation. Reviewers: rsmith, doug.gregor, rnk, eli.friedman, cdavis5x Reviewed By: rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2953 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202951 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust logic for 'objc_protocol_requires_explicit_implementation' for ↵Ted Kremenek2014-03-052-10/+92
| | | | | | | | | | | | | | | | | | | | | | | | inherited protocols and protocols already conformed in the class hierarchy. Per more discussion, 'objc_protocol_requires_explicit_implementation' is refinement that it mainly adds that requirement that a protocol must be explicitly satisfied at the moment the first class in the class hierarchy conforms to it. Any subclasses that also conform to that protocol, either directly or via conforming to a protocol that inherits that protocol, do not need to re-implement that protocol. Doing this requires first doing a pass on the super class hierarchy, gathering the set of protocols conformed to by the super classes, and then culling those out when determining conformance. This two-pass algorithm could be generalized for all protocol checking, and could possibly be a performance win in some cases. For now we restrict this change to protocols with this attribute to isolate the change in logic (especially as the design continues to evolve). This change needs to be adjusted for properties as well; this only impacts methods right now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202948 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] allow clause 'private' on directive 'omp simd'Alexey Bataev2014-03-053-11/+67
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202944 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] emit error message for clause 'if(1 0)'Alexey Bataev2014-03-052-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202942 91177308-0d34-0410-b5e6-96231b3b80d8
* [AST] A "Class<P>" type should not have '*' when printed out.Argyrios Kyrtzidis2014-03-053-2/+15
| | | | | | rdar://14309030 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202941 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPNEMP] Fixed instantiation of 'if' clauseAlexey Bataev2014-03-052-6/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202940 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively fix MSVC buildbotsDavid Majnemer2014-03-051-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202938 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge using-decl-pr17575.cpp into existing test case.Peter Collingbourne2014-03-052-11/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202925 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test case for PR17575.Peter Collingbourne2014-03-051-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202922 91177308-0d34-0410-b5e6-96231b3b80d8
* [-Wunreachable-code] Don't warn about dead code guarded by a "configuration ↵Ted Kremenek2014-03-052-10/+97
| | | | | | | | | | | | | | | value". Some unreachable code is only "sometimes unreachable" because it is guarded by a configuration value that is determined at compile time and is always constant. Sometimes those represent real bugs, but often they do not. This patch causes the reachability analysis to cover such branches even if they are technically unreachable in the CFG itself. There are some conservative heuristics at play here to determine a "configuration value"; these are intended to be refined over time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202912 91177308-0d34-0410-b5e6-96231b3b80d8
* Headers: Provide an ABI compatible max_align_t when _MSC_VER is definedDavid Majnemer2014-03-042-0/+9
| | | | | | | | | | | | | | | | Summary: Our usual definition of max_align_t wouldn't match up with MSVC if it was used in a template argument. Reviewers: chandlerc, rsmith, rnk Reviewed By: chandlerc CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2924 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202911 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unnecessary qualificationDavid Blaikie2014-03-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202909 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C. Return 0 as class of methods in protocols.Fariborz Jahanian2014-03-042-4/+3
| | | | | | | | This simplifies my last patch a bit. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202906 91177308-0d34-0410-b5e6-96231b3b80d8
* Support relative paths in VFSFromYAMLBen Langmuir2014-03-042-3/+21
| | | | | | | | | Use llvm::sys::fs::make_absolute to get an absolute path before matching. Also, allow "." directories to enable testing. ".." is still not supported, and will require crossing file system boundaries to implement correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202903 91177308-0d34-0410-b5e6-96231b3b80d8
* TokenKinds: _Atomic isn't a keyword in MS modeDavid Majnemer2014-03-042-1/+2
| | | | | | | | | | | | | | | | | Summary: This is needed to allow MSVC's <atomic> header to properly parse. It uses _Atomic as a class-id. Reviewers: rnk Reviewed By: rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2948 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202901 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Refix r202888 (a fix to r202769) in a different way, ensuring ↵David Blaikie2014-03-041-2/+7
| | | | | | types aren't needlessly built during -gmlt git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202900 91177308-0d34-0410-b5e6-96231b3b80d8