summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: Don't hang forever when encountering a stray "}" in an ↵Benjamin Kramer2014-01-082-0/+8
| | | | | | | | @implementation block. PR18406. llvm-svn: 198770
* clang-format: Fix spacing in Cpp11 braced lists:Daniel Jasper2014-01-082-1/+3
| | | | | | | | | | Before: vector<int> foo{ ::SomeFunction()}; After: vector<int> foo{::SomeFunction()}; llvm-svn: 198769
* Treating the RegParmAttr as a TypeAttr because that is what it is.Aaron Ballman2014-01-082-20/+3
| | | | | | Patch reviewed by Rafael Espindola. llvm-svn: 198765
* Define ENABLE_CLANG_EXAMPLES instead of relying on BUILD_EXAMPLESAlp Toker2014-01-082-1/+7
| | | | | | | This is a further build fix attempt for r198747 on some Makefile builders where the value wasn't set at all. llvm-svn: 198764
* Prospective build fix for the Makefile systemAlp Toker2014-01-081-0/+1
| | | | llvm-svn: 198751
* Build fix following r198747Alp Toker2014-01-082-1/+6
| | | | | | | | | | | Convert CMake CLANG_BUILD_EXAMPLES to a boolean value for consumption by Python, otherwise the raw config string gets passed through which may not be 0/1. The if/else matches the technique used to solve the problem in LLVM's own CMakeLists.txt. llvm-svn: 198750
* Use -std=gnu89 in tools/c-index-test/CMakeLists.txtRafael Espindola2014-01-081-1/+1
| | | | | | | | | With the old use of -std=c89 off_t is not defined and the build fails. This seems to be another variation of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40278. llvm-svn: 198748
* Add tests for clang pluginsAlp Toker2014-01-084-0/+29
| | | | | | | | | | | | | | | Somehow the entire plugin infrastructure went wholly untested until now. The only plugins available for use in testing are the examples, so plugin tests will only be run if CLANG_BUILD_EXAMPLES is enabled in the build. (The examples should really be enabled by default, not just to aid testing but also to prevent bitrot in some key user-facing code. I'll propose that shortly.) Requires supporting changes in LLVM r198746. llvm-svn: 198747
* For AArch64, support builtin neon vector type with 'long' as base element type.Jiangning Liu2014-01-082-0/+18
| | | | llvm-svn: 198741
* RP18408: If a member template is used as a template template argument, it doesRichard Smith2014-01-082-1/+16
| | | | | | not cause the template specialization to have no linkage. llvm-svn: 198726
* PR18400: ignore cv-qualifiers on the underlying type of an enumeration.Richard Smith2014-01-083-6/+13
| | | | llvm-svn: 198723
* [Driver] Fix a typo in the setting of the arch name when -arch x86_64h is used.Quentin Colombet2014-01-082-1/+10
| | | | | | <rdar://problem/15711488> llvm-svn: 198722
* PR18234: Mark a tag definition as invalid early if it appears in aRichard Smith2014-01-088-17/+63
| | | | | | | | type-specifier in C++. Some checks will assert in this case otherwise (in particular, the access specifier may be missing if this happens inside a class definition, due to a violation of an AST invariant). llvm-svn: 198721
* Re-applying r198699 after reverting r198461.Adrian Prantl2014-01-074-9/+13
| | | | | | | | Debug info: Implement a cleaner version of r198461. For symmetry with C and C++ don't emit an extra lexical scope for the compound statement that is the body of an Objective-C method. llvm-svn: 198715
* Revert "Debug info: Ensure that the last stop point in a function is still ↵Adrian Prantl2014-01-077-24/+11
| | | | | | | | within" This reverts commit r198461. llvm-svn: 198714
* Revert "Debug info: Implement a cleaner version of r198461. For symmetry with"Adrian Prantl2014-01-078-15/+22
| | | | | | This reverts commit 198699 so we can get a cleaner patch. llvm-svn: 198713
* [analyzer] Files with .c extensions are still C++ files if the compiler is CXX.Jordan Rose2014-01-071-4/+10
| | | | | | PR18339 llvm-svn: 198711
* [analyzer] Pointers escape into +[NSValue valueWithPointer:]...Jordan Rose2014-01-075-3/+25
| | | | | | | | | | ...even though the argument is declared "const void *", because this is just a way to pass pointers around as objects. (Though NSData is often a better one.) PR18262 llvm-svn: 198710
* [analyzer] Remove unused ARCNotOwnedSymbol retain count return effect.Jordan Rose2014-01-072-9/+3
| | | | | | | | | | | | RetainCountChecker has to track returned object values to know if they are retained or not. Under ARC, even methods that return +1 are tracked by the system and should be treated as +0. However, this effect behaves exactly like NotOwned(ObjC), i.e. a generic Objective-C method that actually returns +0, so we don't need a special case for it. No functionality change. llvm-svn: 198709
* Updating the documentation about how to add attributes based on the rather ↵Aaron Ballman2014-01-071-21/+124
| | | | | | extensive refactorings that have happened over the past several months. llvm-svn: 198705
* [cmake] Write Version.inc at cmake time, not at build time.Nico Weber2014-01-071-14/+7
| | | | | | | | In SVN checkouts, clang_revision_tag is rerun on every build, even if nothing else is dirty. After this change, Version.inc is only written at cmake time, so that empty builds run 0 build steps (like r191784 apparently did for git). llvm-svn: 198704
* Debug info: Implement a cleaner version of r198461. For symmetry withAdrian Prantl2014-01-078-22/+15
| | | | | | | | | C and C++ don't emit an extra lexical scope for the compound statement that is the body of an Objective-C method. rdar://problem/15010825 llvm-svn: 198699
* Shorten the output of `clang-format --version`, include revision number.Nico Weber2014-01-073-1/+15
| | | | | | | | | | | | | | | | | Before: $ clang-format --version LLVM (http://llvm.org/): LLVM version 3.5svn Optimized build with assertions. Built Jan 3 2014 (14:28:46). Default target: x86_64-apple-darwin13.0.0 Host CPU: core-avx-i Now: $ bin/clang-format --version clang-format version 3.5 (198452) llvm-svn: 198694
* Remove unused include.Rafael Espindola2014-01-071-1/+0
| | | | llvm-svn: 198692
* Update Clang for the move of headers in r198688.Chandler Carruth2014-01-071-1/+1
| | | | llvm-svn: 198689
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-0788-123/+105
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* For areVectorOperandsLaxBitCastable(), only return false if both opearands ↵Argyrios Kyrtzidis2014-01-073-15/+29
| | | | | | | | | | are vector types and add a diagnostic when the operand is a vector and non-scalar value. rdar://15722301 llvm-svn: 198680
* Fix a -Wparentheses warning from GCC that caught a badly formed assert.Chandler Carruth2014-01-071-1/+1
| | | | | | | I have no idea why Clang's warning doesn't fire here, looks like a Clang bug. I'll investigate that separately. llvm-svn: 198677
* CodeGen: Include llvm/Config/config.h for strtoll on WindowsJustin Bogner2014-01-071-0/+1
| | | | llvm-svn: 198672
* Fix 'unkown' typo in test -target from r198321Alp Toker2014-01-071-1/+1
| | | | llvm-svn: 198671
* update comment.Adrian Prantl2014-01-071-1/+1
| | | | llvm-svn: 198670
* Bring back magic constants in the digraph diagnosticAlp Toker2014-01-073-6/+21
| | | | | | | | This backs out changes in commit r198605 and part of r198604, replacing the original tok::kw_template with a slightly more obvious placeholder tok::unknown. llvm-svn: 198666
* Implement a new -fstandalone-debug option. rdar://problem/15685848Adrian Prantl2014-01-0715-42/+88
| | | | | | | | | | | | | | It controls everything that -flimit-debug-info used to, plus the vtable type optimization. The old -fno-limit-debug-info option is now an alias to -fstandalone-debug and vice versa. Standalone is the default on Darwin until dtrace is updated to work with non-standalone debug info (rdar://problem/15758808). Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind because NoStandaloneDebugInfo sounded even more confusing. llvm-svn: 198655
* ObjectiveC. Computation of offsets when doing @encode type encodingFariborz Jahanian2014-01-071-1/+12
| | | | | | is only used in an assert. Do not do it if assert is not on. llvm-svn: 198652
* clang/test/CodeGenCXX/instr-profile.cpp: Appease -Asserts.NAKAMURA Takumi2014-01-071-0/+3
| | | | | FIXME: Don't seek bb labels, like "if.else" llvm-svn: 198651
* CodeGen: Sentences end with a periodJustin Bogner2014-01-073-4/+4
| | | | llvm-svn: 198649
* Properly sort CMake list. NFC.Ted Kremenek2014-01-061-6/+6
| | | | llvm-svn: 198645
* CodeGen: Initial instrumentation based PGO implementationJustin Bogner2014-01-0620-59/+1710
| | | | llvm-svn: 198640
* Driver: Accept -fprofile-instr-use and -fprofile-instr-generateJustin Bogner2014-01-066-0/+31
| | | | | | These flags will be used for instrumentation based PGO. llvm-svn: 198639
* Prospective MSVC 2010 build fixAlp Toker2014-01-062-6/+6
| | | | | | | Try to fix Compiler Error C2011 following r198607 by removing enum from 'enum TokenKind' parameter types. llvm-svn: 198621
* Correct underlying integer type of enum TokenKindAlp Toker2014-01-063-10/+7
| | | | | | | | | | This matches up the underlying type against the actual storage type 'unsigned short' and lets us get rid of some casts while we're at it. Effort is made to keep this building in pre-C++11 but as with other features Token will be less efficiently packed in in legacy configurations. llvm-svn: 198607
* Simplify diagnostic tag type using the token kind formatterAlp Toker2014-01-062-9/+3
| | | | | | As far as the parser is concerned the tag type is always a keyword. llvm-svn: 198606
* Don't use magic constants in the digraph diagnosticAlp Toker2014-01-062-19/+4
| | | | llvm-svn: 198605
* Support diagnostic formatting of keyword tokensAlp Toker2014-01-063-7/+25
| | | | | | | | | Implemented with a new getKeywordSpelling() accessor. Unlike getTokenName() the result of this function is stable and may be used in diagnostic output. Uses of this feature are split out into the subsequent commit. llvm-svn: 198604
* Rename getTokenSimpleSpelling() to getPunctuatorSpelling()Alp Toker2014-01-064-5/+5
| | | | | | | That's what it does, what the documentation says it does and what callers expect it to do. llvm-svn: 198603
* Highlight the previous underlying enum type when diagnosing a mismatchAlp Toker2014-01-063-1/+13
| | | | | | | | | | | | | | enum-scoped.cpp:93:6: error: enumeration redeclared with different underlying type 'short' (was 'int') enum Redeclare6 : short; ^ enum-scoped.cpp:92:6: note: previous declaration is here enum Redeclare6 : int; ^ ~~~ The redeclaration source range is still missing but this is a step forward, potentially edging towards a FixIt. llvm-svn: 198601
* Diagnose enum redeclarations properlyAlp Toker2014-01-062-7/+7
| | | | | | | | | | | | | | | | | | In all three checks, the note indicates a previous declaration and never a 'use'. Before: enum-scoped.cpp:92:6: note: previous use is here enum Redeclare6 : int; ^ After: enum-scoped.cpp:92:6: note: previous declaration is here enum Redeclare6 : int; ^ llvm-svn: 198600
* Use token kind instead of '%select{.|->}0' in diagnosticAlp Toker2014-01-062-4/+3
| | | | llvm-svn: 198599
* Apply some LLVM_READONLY / LLVM_READNONE on diagnostic functionsAlp Toker2014-01-063-11/+13
| | | | llvm-svn: 198598
* [OpenCL] Produce an error if an address space is used on the returnJoey Gouly2014-01-063-0/+27
| | | | | | type of a function. llvm-svn: 198597
OpenPOWER on IntegriCloud