summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* AST: Fix __uuidof for template specializationsDavid Majnemer2014-07-141-5/+5
| | | | | | | | | | | While we previously supported __uuidof applied to a template specialization, we would only find the uuid attribute if it was applied to the template argument. We would erroneously ignore the uuid attribute on the specialization itself. This is required to parse Windows Runtime C++ Template Library headers. llvm-svn: 213016
* Remove dead code.Richard Smith2014-07-141-11/+0
| | | | llvm-svn: 213013
* AST: Cleanup __uuidof related codeDavid Majnemer2014-07-141-9/+8
| | | | | | | | Switch some things to use range-based for loops. Change CXXUuidofExpr::GetUuidAttrOfType's return type to be const. No functionality changed. llvm-svn: 213009
* Continue parsing an expression list even after an error is encountered.Kaelyn Takata2014-07-141-5/+8
| | | | | | | | | Otherwise, multiple errors such as having unknown identifiers for two arguments won't be diagnosed properly (e.g. only the first one would have a diagnostic message if typo correction fails even though both would be diagnosed if typo correction suggests a replacement). llvm-svn: 213003
* Fix build with various feature flag combinationsAlp Toker2014-07-141-3/+1
| | | | llvm-svn: 212996
* Drop separate UIntMaxType and just derive it from IntMaxType.Joerg Sonnenberger2014-07-142-19/+2
| | | | llvm-svn: 212987
* Introduce getCorrespondingUnsignedType() in TargetInfo to work like theJoerg Sonnenberger2014-07-141-2/+4
| | | | | | | | corresponding AST context function, only restricted to basic integer types. Use this to ensure getUIntPtrType() gives types consistent with getIntPtrType(). Fix NVPTX backend to give signed intptr_t. llvm-svn: 212982
* In C++98, if an rvalue reference binds to a function lvalue (or an xvalue or anRichard Smith2014-07-141-1/+1
| | | | | | | | array prvalue), treat that as a direct binding. Only the class prvalue case needs to be excluded here; the rest are extensions anyway, so we can treat them as we would in C++11. llvm-svn: 212978
* Fix case-sensitivity of inferred framework modulesBen Langmuir2014-07-141-0/+6
| | | | | | | Just because we can open a directory named "COcoa.framework" doesn't mean we should provide a "COcoa" module on a case-insensitive filesystem. llvm-svn: 212975
* Fix typosAlp Toker2014-07-143-3/+3
| | | | | | Also consolidate 'backward compatibility' llvm-svn: 212974
* Revert "Improve error recovery around colon."Reid Kleckner2014-07-142-31/+24
| | | | | | | | This reverts commit r212957. It broke the self-host on code like this from LLVM's option library: for (auto Arg: filtered(Id0, Id1, Id2)) llvm-svn: 212965
* Improve error recovery around colon.Serge Pavlov2014-07-142-24/+31
| | | | | | | | | Recognize additional cases, when '::' is mistyped as ':'. This is a fix to RP18587 - colons have too much protection in member-declarations. Differential Revision: http://reviews.llvm.org/D3653 llvm-svn: 212957
* CodeGen: Let arrays be inputs to inline asmDavid Majnemer2014-07-141-5/+6
| | | | | | | | | | | An array showing up in an inline assembly input is accepted in ICC and GCC 4.8 This fixes PR20201. Differential Revision: http://reviews.llvm.org/D4382 llvm-svn: 212954
* ARM: Add NOP intrinsic mapping in arm_acle.hYi Kong2014-07-141-2/+8
| | | | llvm-svn: 212950
* ARM: Implement __builtin_arm_nop intrinsicYi Kong2014-07-141-0/+6
| | | | | | | | | | | This patch implements __builtin_arm_nop intrinsic for AArch32 and AArch64, which generates hint 0x0, the alias of NOP instruction. This intrinsic is necessary to implement ACLE __nop intrinsic. Differential Revision: http://reviews.llvm.org/D4495 llvm-svn: 212947
* clang-format: Improve cast detection (fix false positive).Daniel Jasper2014-07-141-0/+2
| | | | | | | | | | Before: fn(a)(b)+1; After: fn(a)(b) + 1; llvm-svn: 212935
* [x32] Add __ILP32__ macro for ILP32 platformsPavel Chupin2014-07-141-0/+6
| | | | | | | | | | | | | | | | Summary: Add __ILP32__ and _ILP32 macro for corresponding platforms. Cover x86_64-*-*-gnux32 with test. Test Plan: test added Reviewers: chandlerc, atanasyan Subscribers: cfe-commits, dschuff, zinovy.nis Differential Revision: http://reviews.llvm.org/D4473 llvm-svn: 212931
* [CMake] Update libdeps.NAKAMURA Takumi2014-07-142-0/+2
| | | | llvm-svn: 212920
* [CMake] Reorder libdeps by alphabetical order.NAKAMURA Takumi2014-07-144-5/+5
| | | | llvm-svn: 212919
* Superficial fix for PR20218: binding a function lvalue to a const reference toRichard Smith2014-07-141-17/+28
| | | | | | | | | | | | | a function pointer is neither better nor worse than binding a function lvalue to a function rvalue reference. Don't get confused and think that both bindings are binding to a function lvalue (which would make the lvalue form win); the const reference is binding to an rvalue. The "real" bug in PR20218 is still present: we're getting the wrong answer from template argument deduction, and that's what leads us to this weird overload set. llvm-svn: 212916
* MS ABI: Stick internal vftables in a comdat if they have RTTI dataDavid Majnemer2014-07-131-6/+4
| | | | | | | | | | | | | | | Previously, we would have a private backing variable and an internal alias pointing at it. However, -fdata-sections only fires if a global variable has non-private linkage. This means that an unreferenced vftable wouldn't get discarded, bloating the object file. Instead, stick the backing variable in a comdat even if the alias has internal linkage. This will allow the linker to drop the vftable if it is unused. llvm-svn: 212901
* Headers: add hint intrinsics to arm_acle.hSaleem Abdulrasool2014-07-121-0/+24
| | | | | | | | This adds the ARM ACLE hint intrinsic wrappers to arm_acle.h. These need to be protected with a !defined(_MSC_VER) since MSVC (and thus clang in compatibility mode) provide these wrappers as proper builtin intrinsics. llvm-svn: 212891
* CodeGen: support hint intrinsics from ACLE on AArch64Saleem Abdulrasool2014-07-121-0/+25
| | | | | | | This adds support for the ACLE hint intrinsics on AArch64 similar to ARM. This is required to properly support ACLE on AArch64. llvm-svn: 212890
* Improve comments of ARM ACLE header file and testsYi Kong2014-07-121-5/+8
| | | | | | Include section number in ARM ACLE specification for easier navigation. llvm-svn: 212887
* Add nonnull in CodeGen for __attribute__((returns_nonnull))Hal Finkel2014-07-121-0/+2
| | | | | | | As a follow-up to r212835, also add the LLVM nonnull function attribute when __attribute__((returns_nonnull)) is provided. llvm-svn: 212874
* [ASan] Collect unmangled names of global variables in Clang to print them in ↵Alexey Samsonov2014-07-123-16/+32
| | | | | | | | | | | | | | | | | error reports. Currently ASan instrumentation pass creates a string with global name for each instrumented global (to include global names in the error report). Global name is already mangled at this point, and we may not be able to demangle it at runtime (e.g. there is no __cxa_demangle on Android). Instead, create a string with fully qualified global name in Clang, and pass it to ASan instrumentation pass in llvm.asan.globals metadata. If there is no metadata for some global, ASan will use the original algorithm. This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=264. llvm-svn: 212872
* Form a CallExpr from __noop without parensReid Kleckner2014-07-111-1/+14
| | | | | | | | | | | | MSVC accepts __noop without any trailing parens and treats it like a literal zero. We don't treat __noop as an integer literal, but now at least we can parse a naked __noop expression. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D4476 llvm-svn: 212860
* [Driver] clang::driver::getARMCPUForMArch() moved to ↵Argyrios Kyrtzidis2014-07-111-83/+2
| | | | | | | | | llvm::Triple::getARMCPUForArch(). Depends on llvm r212846. Suggested by Eric Christopher. llvm-svn: 212858
* Consolidate header inclusion diagnosticsAlp Toker2014-07-112-26/+25
| | | | | | | Make argument orders match, unify diagnostic IDs and reword the message to be a little less saccharine. llvm-svn: 212845
* CodeGen: Don't emit a thread-wrapper if we can't touch the backing variableDavid Majnemer2014-07-111-7/+23
| | | | | | | | | | | | | | | | OS X TLS has all accesses going through the thread-wrapper function and gives the backing thread-local variable internal linkage. This means that thread-wrappers must have WeakAnyLinkage so that references to the internal thread-local variables do not get propagated to other code. It also means that translation units which do not provide a definition for the thread-local variable cannot attempt to emit a thread-wrapper because the thread wrapper will attempt to reference the backing variable. Differential Revision: http://reviews.llvm.org/D4109 llvm-svn: 212841
* MS extension: Make __noop be the integer zero, not voidReid Kleckner2014-07-111-1/+2
| | | | | | | We still don't accept '__noop;', and we don't consider __noop to be the integer literal zero. More work is needed. llvm-svn: 212839
* Handle SPARC float command line parameters for SPARCv9.Brad Smith2014-07-111-1/+2
| | | | llvm-svn: 212838
* [modules] When merging a class template, also merge the definition of its ↵Richard Smith2014-07-111-3/+20
| | | | | | pattern. llvm-svn: 212836
* Add nonnull in CodeGen for __attribute__((nonnull))Hal Finkel2014-07-111-0/+11
| | | | | | | | We now have an LLVM-level nonnull attribute that can be applied to function parameters, and we emit it for reference types (as of r209723), but did not emit it when an __attribute__((nonnull)) was provided. Now we will. llvm-svn: 212835
* The returns_nonnull attribute does not require a function prototype because ↵Aaron Ballman2014-07-111-1/+1
| | | | | | it affects only the return value, not any arguments. In turn, asking for a function or method result type should not require a function prototype either, so getFunctionOrMethodResultType has been relaxed. llvm-svn: 212827
* Instantiate llvm::Registry<clang::PluginASTAction> in FrontendAction.cpp.NAKAMURA Takumi2014-07-111-0/+2
| | | | | | | - Plugins don't need to export _ZN4llvm8Registry*. - Win32.DLL cannot merge common symbols among DLLs. Static members in llvm::Registry should be instantiated in a parent. llvm-svn: 212821
* [PATCH] [x32] Introduce -mx32 flag enforcing x32 mode for other triplets. By ↵Zinovy Nis2014-07-111-4/+8
| | | | | | | | | | | | Pavel Chupin (@pavel.v.chupin). -mx32 flag setup target environment to GNUX32 and can be used for other 32/64-bit triplets (i386-unknown-linux, x86_64-unknown-linux) to turn on x32 mode. Compatible with GCC -mx32 flag. Differential Revision: http://reviews.llvm.org/D4470 llvm-svn: 212817
* GCC compatibility: Create a Group to ignore unsupported optimization.Sylvestre Ledru2014-07-111-0/+7
| | | | | | | | | | | | Returns a warning when using an unknown optimization flag. This patch includes -finline-limit as one of those ignored flags. More options will be moved in this group Patch by Arthur Marble <arthur@info9.net> in the context of Debian Google Summer of code 2014. Reviewers: rnk, Sylvestre llvm-svn: 212805
* [OPENMP] Parsing and sema analysis for 'omp task' directive.Alexey Bataev2014-07-1113-96/+299
| | | | llvm-svn: 212804
* Don't assume StringRef.data() is null-terminatedBen Langmuir2014-07-111-1/+1
| | | | llvm-svn: 212790
* TestAfterDivZeroChecker.cpp: Avoid member initializer. It is unsupported in ↵NAKAMURA Takumi2014-07-111-2/+2
| | | | | | msc17. llvm-svn: 212789
* [modules] Don't try to merge template specializations by performing name lookupRichard Smith2014-07-111-2/+5
| | | | | | | | | into their container; we won't find them there. These things are already being merged when they're added to their primary template's folding set, so this merging is redundant (and causes us to reject-valid because we think we've found an odr violation). llvm-svn: 212788
* Return a FixItHint instead of taking a diagnostic builderReid Kleckner2014-07-111-7/+6
| | | | | | Addressing review comments from r212784. llvm-svn: 212786
* MSVC compat: Allow lookup of friend types in enclosing namespacesReid Kleckner2014-07-101-6/+63
| | | | | | | | | | | | | | | | | | | | | | | The relevant portion of C++ standard says [namespace.memdef]p3: If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace. MSVC does not implement that rule for types. If there is a type in an enclosing namespace, they consider an unqualified tag declaration with the same name to be a redeclaration of the type from another namespace. Implementing compatibility is a simple matter of disabling our implementation of this rule for types, which was added in r177473. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D4443 llvm-svn: 212784
* Enable -gcolumn-info by default.Diego Novillo2014-07-101-1/+2
| | | | | | | | | | | | | | | This patch flips the default value for -gcolumn-info to be on by default. I discussed the rationale and provided compile/size data in: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/074290.html This also updates the documentation and some tests that relied on the lack of column information. Some tests had column information in the expected output, but it was wrong (the tsan tests). Others were using the driver to execute. llvm-svn: 212781
* Add AST dumping for VarDecl init kind.Richard Smith2014-07-101-0/+5
| | | | llvm-svn: 212774
* [UBSan] Introduce type-based blacklisting.Alexey Samsonov2014-07-103-38/+47
| | | | | | | | | Teach UBSan vptr checker to ignore technically invalud down-casts on blacklisted types. Based on http://reviews.llvm.org/D4407 by Byoungyoung Lee! llvm-svn: 212770
* Be more specific about return types of some methods.Alexey Samsonov2014-07-102-10/+12
| | | | | | | This would allow to call addCompilerUsedGlobal on some Clang-generated globals. llvm-svn: 212767
* PR20256: don't accidentally instantiate non-dependent default-initialization asRichard Smith2014-07-102-2/+10
| | | | | | value-initialization. llvm-svn: 212764
* Fix the dtor location issues in PR20038 harder.David Blaikie2014-07-103-17/+30
| | | | | | | | | | | | | Originally committed in r211722, this fixed one case of dtor calls being emitted without locations (this causes problems for debug info if the call is then inlined), this caught only some of the cases. Instead of trying to re-enable the location before the cleanup, simply re-enable the location immediately after the unconditional branches in question using a scoped device to ensure the no-location state doesn't leak out arbitrarily. llvm-svn: 212761
OpenPOWER on IntegriCloud