summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Mangle the vbptr offset into pointers to member functionsReid Kleckner2014-04-071-6/+7
| | | | | | | | This can actually be non-zero if you override a function from a virtual base and you have forced the most_general pointer to member representation. llvm-svn: 205727
* Revert r205646 (keeping the test in its modified form) asFariborz Jahanian2014-04-071-10/+1
| | | | | | it is subsumed by r205521. llvm-svn: 205718
* Fix a typo introduced in r205716David Majnemer2014-04-071-3/+2
| | | | llvm-svn: 205717
* clang-cl: make /Gw map to -fdata-sectionsDavid Majnemer2014-04-071-6/+5
| | | | | | Note that /Gy no longer implies -fdata-sections. llvm-svn: 205716
* Fix clang-tidy warning (argument comments don't match parameter names).Richard Smith2014-04-071-3/+3
| | | | llvm-svn: 205715
* DebugInfo: Support type alias templatesDavid Blaikie2014-04-062-4/+36
| | | | | | | | We already got the type alias correct (though I've included a test case here) since Clang represents that like any other typedef - but type alias templates weren't being handled. llvm-svn: 205691
* DebugInfo: emit namespace aliases as named imported declarations instead of ↵David Blaikie2014-04-061-2/+2
| | | | | | | | named imported entities Apparently that's how DWARF4 suggests they be emitted. So let's do that. llvm-svn: 205686
* [Frontend] If the module file lock owner have died, try to get the lock ↵Argyrios Kyrtzidis2014-04-061-22/+33
| | | | | | again. Needs llvm r205683. llvm-svn: 205684
* Reapply r205655, DebugInfo: Place global constants in their appropriate context.David Blaikie2014-04-051-1/+4
| | | | | | | This was reverted in 205664 and seems to be fixed by 205668... though that may be more by accident than anything well founded. llvm-svn: 205669
* DebugInfo: Avoid emitting constnants for every useDavid Blaikie2014-04-051-1/+5
| | | | | | | | While the folding set would deduplicate the nodes themselves and LLVM would handle not emitting the same global twice, it still meant creating a long/redundant list of global variables. llvm-svn: 205668
* Add a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,Richard Trieu2014-04-052-0/+262
| | | | | | | | | | | | | | which warns on compound conditionals that always evaluate to the same value. For instance, (x > 5 && x < 3) will always be false since no value for x can satisfy both conditions. This patch also changes the CFG to use these tautological values for better branch analysis. The test for -Wunreachable-code shows how this change catches additional dead code. Patch by Anders Rönnholm. llvm-svn: 205665
* Revert "DebugInfo: Place global constants in their appropriate context."David Blaikie2014-04-051-4/+1
| | | | | | | | | This reverts commit r205655. Breaks the compiler-rt build with an assertion failure in LLVM... reverting while I investigate. llvm-svn: 205664
* [analyzer] Look through temporary destructors when finding a region to ↵Jordan Rose2014-04-051-2/+10
| | | | | | | | | | | | construct. Fixes a false positive when temporary destructors are enabled where a temporary is destroyed after a variable is constructed but before the VarDecl itself is processed, which occurs when the variable is in the condition of an if or while. Patch by Alex McCarthy, with an extra test from me. llvm-svn: 205661
* Objective-C arc [Sema]. Allow bridge cast of a qualified-id expressionFariborz Jahanian2014-04-041-2/+18
| | | | | | | when bridged Objective-C type conforms to the protocols in CF types's Objective-C class. // rdar://16393330 llvm-svn: 205659
* DebugInfo: Place global constants in their appropriate context.David Blaikie2014-04-041-1/+4
| | | | | | | We also don't need to duplicate the name in the LinkageName field. Just leave it empty. llvm-svn: 205655
* Try harder about not suggesting methods as corrections when theyKaelyn Takata2014-04-043-33/+29
| | | | | | | | obviously won't work. Specifically, don't suggest methods (static or not) from unrelated classes when the expression is a method call through a specific object. llvm-svn: 205653
* DebugInfo: PR19298: function local const variables duplicated in the root scopeDavid Blaikie2014-04-041-0/+3
| | | | | | | | | | | | | | See the comment for CodeGenFunction::tryEmitAsConstant that describes how in some contexts (lambdas) we must not emit references to the variable, but instead use the constant directly - because of this we end up emitting a constant for the variable, as well as emitting the variable itself. Should we just skip putting the variable on the stack at all and omit the debug info for the constant? It's not clear to me - what if the address of the local is taken? llvm-svn: 205651
* Driver: add target definition for Windows on ARMSaleem Abdulrasool2014-04-043-6/+129
| | | | | | | | | This introduces the definitions needed for the Windows on ARM target. Add target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI environment. The Visual Studio definitions correspond to the definitions provided by Visual Studio 2012. llvm-svn: 205650
* Vector [Sema]. Vector "splats" which are truncated should have a warningFariborz Jahanian2014-04-041-1/+10
| | | | | | with -Wconversion. // rdar://16502418 llvm-svn: 205646
* In preparation for being able to use simple Boolean logic expressions ↵Aaron Ballman2014-04-041-15/+41
| | | | | | involving capabilities, the semantics for attributes now looks through the types of the constituent parts of a capability expression instead of at the aggregate expression type. llvm-svn: 205629
* When printing types for the OpenCL kernel metadata, use the PrintingPolicy.Joey Gouly2014-04-041-2/+5
| | | | | | | | This allows 'half' to be printed as 'half' and not as '__fp16'. Patch by Fraser Cormack! llvm-svn: 205624
* [OPENMP][C++11] Renamed loop vars properly.Alexey Bataev2014-04-042-16/+16
| | | | llvm-svn: 205620
* clang-format: Don't merge simple blocks in case statements.Daniel Jasper2014-04-041-1/+1
| | | | | | | | | | | | | | | | Before: switch (a) { case 1: { return 'a'; } } After: switch (a) { case 1: { return 'a'; } } llvm-svn: 205611
* Basic: rename VisualStudio to WindowsSaleem Abdulrasool2014-04-041-6/+6
| | | | | | | | Visual Studio is the Integrated Development Environment. The toolchain is generally referred to MSVC. Rename the target information to be more precise as per the recommendation of Reid Kleckner. llvm-svn: 205609
* Extend -Wtautological-constant-out-of-range-compare to handle boolean valuesRichard Trieu2014-04-042-74/+169
| | | | | | | | | | | | | | | better. This warning will now trigger on the following conditionals: bool b; int i; if (b > 1) {} // always false if (0 <= (i > 5)) {} // always true if (-1 > b) {} // always false Patch by Per Viberg. llvm-svn: 205608
* CodeGen: Don't create branch weight metadata from empty profilesJustin Bogner2014-04-041-2/+6
| | | | | | | | | | | If all of our weights are zero when calculating branch weights, it means we haven't profiled the code in question. Avoid creating a metadata node that says all branches are equally likely in this case. The test also checks constructs that hit the other createBranchWeights overload. These were already working. llvm-svn: 205606
* Turn off -Wmissing-noreturn warning for blocks Fariborz Jahanian2014-04-031-6/+2
| | | | | | | as there is no way to attach this attribute to the block literal. // rdar://16274746 llvm-svn: 205580
* vector [Sema]. Check for proper use of 's' char prefixFariborz Jahanian2014-04-031-1/+1
| | | | | | | (which indicates vector expression is a string of hex values) instead of crashing in code gen. // rdar://16492792 llvm-svn: 205557
* -fms-extensions: Error out on #pragma init_segReid Kleckner2014-04-031-0/+18
| | | | | | | | | | | | | By ignoring this pragma with a warning, we're essentially miscompiling the user's program. WebKit / Blink use this pragma to disable dynamic initialization and finalization of some static data, and running the dtors crashes the program. Error out for now, so that /fallback compiles the TU correctly with MSVC. This pragma should be implemented some time this month, and we can remove this hack. llvm-svn: 205554
* Revert r205436:Roman Divacky2014-04-031-28/+5
| | | | | | | | | | | | | | | | Extend the SSE2 comment lexing to AVX2. Only 16byte align when not on AVX2. This provides some 3% speedup when preprocessing gcc.c as a single file. The patch is wrong, it always uses SSE2, and when I fix that there's no speedup at all. I am not sure where the 3% came from previously. --Thi lie, and those below, will be ignored-- M Lex/Lexer.cpp llvm-svn: 205548
* Teach getTemplateInstantiationPattern to deal with generic lambdas.Faisal Vali2014-04-032-4/+23
| | | | | | | | | | | | | No functionality change. When determining the pattern for instantiating a generic lambda call operator specialization - we must not go drilling down for the 'prototype' (i.e. as written) pattern - rather we must use our partially transformed pattern (whose DeclRefExprs are wired correctly to any enclosing lambda's decls that should be mapped correctly in a local instantiation scope) that is the templated pattern of the specialization's primary template (even though the primary template might be instantiated from a 'prototype' member-template). Previously, the drilling down was haltted by marking the instantiated-from primary template as a member-specialization (incorrectly). This prompted Richard to remark (http://llvm-reviews.chandlerc.com/D1784?id=4687#inline-10272) "It's a bit nasty to (essentially) set this bit incorrectly. Can you put the check into getTemplateInstantiationPattern instead?" In my reckless youth, I chose to ignore that comment. With the passage of time, I have come to learn the value of bowing to the will of the angry Gods ;) llvm-svn: 205543
* Code cleanup (re-indent)Logan Chien2014-04-031-7/+7
| | | | llvm-svn: 205536
* Revert "Add support for named values in the parser."Samuel Benzaquen2014-04-031-27/+21
| | | | | | | | This was submitted before it was ready. This reverts commit 62060a01e095cf35eb9ca42a333752d12714f35c. llvm-svn: 205533
* clang-format: Prefer an additional line-break over hanging indent.Daniel Jasper2014-04-031-0/+12
| | | | | | | | | | | | | | | | | | | | Don't allow the RHS of an operator to be split over multiple lines unless there is a line-break right after the operator. Before: if (aaaa && bbbbb || // break cccc) { } After: if (aaaa && bbbbb || // break cccc) { } In most cases, this seems to increase readability. llvm-svn: 205527
* xDaniel Jasper2014-04-031-1/+1
| | | | llvm-svn: 205526
* Improved semantics for implicit scalar -> extvector conversions.Stephen Canon2014-04-032-29/+36
| | | | llvm-svn: 205521
* clang-format: Understand that "auto" is a type.Daniel Jasper2014-04-031-1/+1
| | | | | | | | | | Before: MACRO(auto * a); After: MACRO(auto *a); llvm-svn: 205517
* [OPENMP] Small update for C++11Alexey Bataev2014-04-032-8/+4
| | | | llvm-svn: 205506
* CodeGen: Emit some functions as weak_odr under -fms-compatibilityDavid Majnemer2014-04-023-7/+50
| | | | | | | | | | | | | | | | | | | Summary: MSVC always emits inline functions marked with the extern storage class specifier. The result is something similar to the opposite of __attribute__((gnu_inline)). This extension is also available in C. This fixes PR19264. Reviewers: rnk, rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3207 llvm-svn: 205485
* Objective-C [IRGen]. Add encoding for 'weak' attribute of aFariborz Jahanian2014-04-021-0/+2
| | | | | | 'readonly' property. // rdar://16136439 llvm-svn: 205477
* If a using-declaration names a class member, but appears outside a class, tryRichard Smith2014-04-022-2/+51
| | | | | | to suggest a different syntax to get the same effect. llvm-svn: 205467
* PR19305: Don't issue -Wunused-variable warnings on variable templates. It's notRichard Smith2014-04-021-2/+4
| | | | | | | | | | | meaningful to odr-use the VarDecl inside a variable template. (Separately, it'd be nice to track referenced-ness for templates, and warn on unused ones, but that's really a distinct issue...) Move a test that generates and tests a warning-suppressing error out to its own test file, so it doesn't have weird effects on the other tests in the same file. llvm-svn: 205448
* DebugInfo: Include default template arguments in template type namesDavid Blaikie2014-04-021-22/+8
| | | | | | | | | | | | | | | This was committed 4 years ago in 108916 with insufficient testing to explain why the "getTypeAsWritten" case was appropriate. Experience says that it isn't - the presence or absence of an explicit instantiation declaration was causing this code to generate either i<int> or i<int, int>. That didn't seem to be a useful distinction, and omitting the template arguments was destructive to debuggers being able to associate the two types across translation units or across compilers (GCC, reasonably, never omitted the arguments). llvm-svn: 205447
* Extend the SSE2 comment lexing to AVX2. Only 16byte align when not on AVX2.Roman Divacky2014-04-021-5/+28
| | | | | | This provides some 3% speedup when preprocessing gcc.c as a single file. llvm-svn: 205436
* Add matcher for ExprWithCleanups.Samuel Benzaquen2014-04-021-0/+1
| | | | | | | | | | | | Summary: Add matcher for ExprWithCleanups. Reviewers: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D3248 llvm-svn: 205420
* Add support for named values in the parser.Samuel Benzaquen2014-04-021-21/+27
| | | | | | | | | | | | | | | | | | | | Summary: Add support for named values in the parser. This allows injection of arbitrary constants using a custom Sema object. Completions are not supported right now. Will be used by clang_query to support the 'let' command. Usage example: clang_query> let unique_ptr recordDecl(hasName("unique_ptr")) clang_query> match varDecl(hasType(unique_ptr)) Reviewers: klimek, pcc CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D3229 llvm-svn: 205419
* Render anonymous entities as '(anonymous <thing>)' (and lambdas as '(lambda ↵David Blaikie2014-04-025-13/+13
| | | | | | | | | | | | at ... )') For namespaces, this is consistent with mangling and GCC's debug info behavior. For structs, GCC uses <anonymous struct> but we prefer consistency between all anonymous entities but don't want to confuse them with template arguments, etc, so we'll just go with parens in all cases. llvm-svn: 205398
* Add the location of Decls to ast dump.David Blaikie2014-04-021-0/+2
| | | | | | | | | While investigating some debug info issues, Eric and I came across a particular template case where the location of a decl was quite different from the range of the same decl. It might've been rather helpful if the dumper had actually showed us this. llvm-svn: 205396
* Fix type mismatch assertion related to inalloca and PR19287Reid Kleckner2014-04-021-2/+5
| | | | | | | | Augment the test case from r205217 to catch this related bug. Fixes the Windows self-host which was failing on VariantValue.cpp. llvm-svn: 205378
* Partially revert r204517 and fix a different way:Eric Christopher2014-04-011-6/+15
| | | | | | | | | | | | | We don't want to encourage the code to emit a lexical block for a function that needs one in order for the line table to change, we need to grab the line information from the body of the pattern that we were instantiated from, this code should do that. Modify the test case to ensure that we're still looking in the right place for all of the scopes and also that we haven't created a lexical block where we didn't need one. llvm-svn: 205368
OpenPOWER on IntegriCloud