aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-13Simplify test so that it is more portable.Rafael Espindola
I have checked that the test still fails when the "|| !P.isRegularFile()" from the original patch is removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13Remove duplicated comment.Simon Atanasyan
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179454 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13Annotate flavor of TLS variable (statically or dynamically initialized) onto ↵Richard Smith
the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13Use MapVector rather than simulating it.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179438 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13Speed-up ObjCMethodDecl::getOverriddenMethods().Argyrios Kyrtzidis
Use an newly introduce ASTContext::getBaseObjCCategoriesAfterInterface() which caches its results instead of re-calculating the categories multiple times. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179436 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13Introduce SourceManager::getDecomposedIncludedLoc, that returns the ↵Argyrios Kyrtzidis
"included/expanded in" decomposed location of the given FileID. The main benefit is to speed-up SourceManager::isBeforeInTranslationUnit which is common to query the included/expanded location of the same FileID multiple times. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13Give this test a triple so that its use of thread_local doesn't make it fail ↵Richard Smith
on the MSVC bot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179432 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13Don't replace an existing decl in the scope chains with itsJohn McCall
local-extern redeclaration; type refinements, default arguments, etc. must all be locally scoped. rdar://13535367 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179430 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Headers: Don't try to use RSIZE_MAX unless we are freestanding.Daniel Dunbar
- We don't want to depend on the platforms stdint.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179429 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[analyzer] Enable NewDelete checker if NewDeleteLeaks checker is enabled.Anton Yartsev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179428 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Headers: Add support for ISO9899:2011 rsize_t.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179427 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12NewDeleteLeaks is a subchecker of NewDelete checker; it is tested in ↵Anton Yartsev
NewDelete-checker-test.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179426 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Parsing support for thread_local and _Thread_local. We give them the sameRichard Smith
semantics as __thread for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12tl;dr: Teach Clang to work around g++ changing its workaround to glibc'sRichard Smith
implementation of C99's attempt to control the C++ standard. *sigh* The C99 standard says that certain macros in <stdint.h>, such as SIZE_MAX, should not be defined when the header is included in C++ mode, unless __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS are defined. The C++11 standard says "Thanks, but no thanks" and C11 removed this rule, but various C library implementations (such as glibc) follow C99 anyway. g++ prior to 4.8 worked around the C99 / glibc behavior by defining __STDC_*_MACROS in <cstdint>, which was incorrect, because <stdint.h> is supposed to provide these macros too. g++ 4.8 works around it by defining __STDC_*_MACROS in its builtin <stdint.h> header. This change makes Clang act like g++ 4.8 in this regard: our <stdint.h> now countermands any attempt by the C library to implement the undesired C99 rules, by defining the __STDC_*_MACROS first. Unlike g++, we do this even in C++98 mode, since that was the intent of the C++ committee, matches the behavior required in C11, and matches our built-in implementation of <stdint.h>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179419 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12<rdar://problem/13643854> Only emit ambiguous-expansion warnings when at ↵Douglas Gregor
least one of the macro definitions comes from a non-system header. This slightly weakens the heuristic introduced in r178109. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179411 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[analyzer] Makes NewDeleteLeaks checker work independently from NewDelete.Anton Yartsev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179410 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Define Neon intrinsics as "static inline" to avoid warning. rdar://13108414Bob Wilson
We had been defining Neon intrinsics as "static" with always_inline attributes. If you use them from an extern inline function, you get a warning, e.g.: static function 'vadd_u8' is used in an inline function with external linkage This change simply adds the inline keyword to avoid that warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179406 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Add test case for r179403.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179404 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Add test case for r179399.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179400 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[analyzer] Print a diagnostic note even if the region cannot be printed.Anna Zaks
There are few cases where we can track the region, but cannot print the note, which makes the testing limited. (Though, I’ve tested this manually by making all regions non-printable.) Even though the applicability is limited now, the enhancement will be more relevant as we start tracking more regions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179396 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[analyzer]Print field region even when the base region is not printableAnna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179395 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Add test case for r179383 and r179393.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179394 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Disable following tests for Hexagon:Jyotsna Verma
1) Driver/output-file-is-dir.c - Checks for object file which can't be created for Hexagon since assembler is unavailable. 2) PCH/cxx-typeid.cpp - 'typeinfo' include file is unavailable for Hexagon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179385 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[libclang] Introduce clang_Location_isInSystemHeader to check if a location ↵Argyrios Kyrtzidis
resides in a system header. This is a modified patch provided from Mikołaj Siedlarek! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179384 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Sema: Give a typically small DenseMap some inline capacity.Benjamin Kramer
Also reflow code a bit, no change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179382 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Revamps structural error detection / handling.Manuel Klimek
Previously we'd only detect structural errors on the very first level. This leads to incorrectly balanced braces not being discovered, and thus incorrect indentation. This change fixes the problem by: - changing the parser to use an error state that can be detected anywhere inside the productions, for example if we get an eof on SOME_MACRO({ some block <eof> - previously we'd never break lines when we discovered a structural error; now we break even in the case of a structural error if there are two unwrapped lines within the same line; thus, void f() { while (true) { g(); y(); } } will still be re-formatted, even if there's missing braces somewhere in the file - still exclude macro definitions from generating structural error; macro definitions are inbalanced snippets git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179379 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Fix clang-format-diff.py script.Daniel Jasper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Provide better emacs integration.Daniel Jasper
The new emacs integration is simpler, does not save the current file before reformatting and ensures that emacs does not scroll as a result of formatting. Also explicitly set the style in clang-format tests to make them more robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179372 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[analyzer] Fix grammar in comment.Jordan Rose
By Adam Schnitzer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[analyzer] Show "Returning from ..." note at caller's depth, not callee's.Jordan Rose
Before: 1. Calling 'foo' 2. Doing something interesting 3. Returning from 'foo' 4. Some kind of error here After: 1. Calling 'foo' 2. Doing something interesting 3. Returning from 'foo' 4. Some kind of error here The location of the note is already in the caller, not the callee, so this just brings the "depth" attribute in line with that. This only affects plist diagnostic consumers (i.e. Xcode). It's necessary for Xcode to associate the control flow arrows with the right stack frame. <rdar://problem/13634363> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179351 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[analyzer] Don't emit extra context arrow after returning from an inlined call.Jordan Rose
In this code int getZero() { return 0; } void test() { int problem = 1 / getZero(); // expected-warning {{Division by zero}} } we generate these arrows: +-----------------+ | v int problem = 1 / getZero(); ^ | +---+ where the top one represents the control flow up to the first call, and the bottom one represents the flow to the division.* It turns out, however, that we were generating the top arrow twice, as if attempting to "set up context" after we had already returned from the call. This resulted in poor highlighting in Xcode. * Arguably the best location for the division is the '/', but that's a different problem. <rdar://problem/13326040> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Remove REQUIRES now that r179237 fixed the real problem.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179349 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Make sure we have the include paths we needDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179347 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12<rdar://problem/13615607> Include SDK version information in the module hash.Douglas Gregor
This is a Darwin-SDK-specific hash criteria used to identify a particular SDK without having to hash the contents of all of its headers. If other platforms have such versioned files, we should add those checks here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179346 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Add test case for r179343.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179344 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Test case for r179339.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179340 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Flail at trying to appease various linuxy buildbots.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179338 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Struct-path aware TBAA: uniformize scalar tag and path tag.Manman Ren
For struct-path aware TBAA, we used to use scalar type node as the scalar tag, which has an incompatible format with the struct path tag. We now use the same format: base type, access type and offset. We also uniformize the scalar type node and the struct type node: name, a list of pairs (offset + pointer to MDNode). For scalar type, we have a single pair. These are to make implementaiton of aliasing rules easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179335 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Fix the driver logic for recent versions of DragonFly.John McCall
Patch by John Marino. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179334 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Update test case for r179323.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179324 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Widen the checks in the ms abi memptr test to work under NDEBUGReid Kleckner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179311 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Exclude test30 of Sema/return.c for Hexagon since setjmp.h include fileJyotsna Verma
is unavailable for Hexagon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Add a new -mimplicit-float option for symmetry with -mno-implicit-float.Bob Wilson
This new option is the default, but it is useful to have a flag to override -mno-implicit-float by putting -mimplicit-float later on the command line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179309 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Follow Jordan's advice and use {{^}} and {{$}} for this testReid Kleckner
This is a better way of ensuring that we match the output of the rewriter and not the CHECK line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179308 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[ms-cxxabi] Implement member pointer emission and dereferencingReid Kleckner
Summary: Handles all inheritance models for both data and function member pointers. Also implements isZeroInitializable() and refactors some of the null member pointer code. MSVC supports converting member pointers through virtual bases, which clang does not (yet?) support. Implementing that extension is covered by http://llvm.org/15713 Reviewers: rjmccall CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D613 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179305 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[PCH] Change test/PCH/headersearch.cpp to use -emit-llvm-only instead of ↵Argyrios Kyrtzidis
-emit-obj git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179301 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[libclang] Improve a doxygen comment, as suggested by Jordan.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179300 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Hexagon: Remove -g option from the assembler command line.Jyotsna Verma
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179299 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[libclang] Have clang_getCXXAccessSpecifier() also return the access control ↵Argyrios Kyrtzidis
of a C++ declaration within its parent scope. Suggested by Stefan Seefeld. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Change clang-format's affinity for breaking after return types.Daniel Jasper
Function declarations are now broken with the following preferences: 1) break amongst arguments. 2) break after return type. 3) break after (. 4) break before after nested name specifiers. Options #2 or #3 are preferred over #1 only if a substantial number of lines can be saved by that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179287 91177308-0d34-0410-b5e6-96231b3b80d8