summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Avoid non-attributive uses of 'unsupported' in diagnosticsAlp Toker2014-07-146-14/+14
| | | | | | | | | | | | | We don't have a style guide for diagnostic messages, but convention strongly favours the forms: 'attribute is not supported', 'unsupported attribute' We generally avoid: 'attribute is unsupported', 'non-supported attribute' llvm-svn: 212972
* Document the forward of the -u option (r211756)Sylvestre Ledru2014-07-141-0/+2
| | | | llvm-svn: 212969
* Document the warning triggered by the unsupported gcc optimization flags ↵Sylvestre Ledru2014-07-141-0/+3
| | | | | | (r212805) llvm-svn: 212968
* Revert "Improve error recovery around colon."Reid Kleckner2014-07-144-142/+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
* Change the diagnostic group for unsupported gcc optimizations added r212805Alp Toker2014-07-142-8/+8
| | | | | | | | | | Use -Winvalid-command-line-argument here to align with existing gcc opt diagnostics. Meanwhile -Wunused-command-line-argument is for flags that we support but were, say, fed into the wrong invocation. Also tweak wording to make sense with -Werror. llvm-svn: 212964
* Improve error recovery around colon.Serge Pavlov2014-07-144-24/+142
| | | | | | | | | 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-143-5/+20
| | | | | | | | | | | 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-142-2/+16
| | | | llvm-svn: 212950
* ARM: Implement __builtin_arm_nop intrinsicYi Kong2014-07-145-0/+15
| | | | | | | | | | | 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
* [ASTMatchers] Make hasOverloadedOperatorName also match freestanding overloads.Benjamin Kramer2014-07-143-5/+12
| | | | | | | | | Freestanding overloads are represented as FunctionDecls in the AST, make the matcher also match them. Differential Revision: http://reviews.llvm.org/D4493 llvm-svn: 212940
* clang-format: Improve cast detection (fix false positive).Daniel Jasper2014-07-142-0/+3
| | | | | | | | | | Before: fn(a)(b)+1; After: fn(a)(b) + 1; llvm-svn: 212935
* [x32] Add __ILP32__ macro for ILP32 platformsPavel Chupin2014-07-142-0/+168
| | | | | | | | | | | | | | | | 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-142-17/+50
| | | | | | | | | | | | | 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
* Remove trailing spacesPavel Chupin2014-07-131-6/+6
| | | | llvm-svn: 212911
* Add test cases for AArch64 hints codegenYi Kong2014-07-131-0/+8
| | | | llvm-svn: 212909
* [CMake] Give explicit dependencies to a couple of modules, ↵NAKAMURA Takumi2014-07-132-0/+18
| | | | | | PrintFunctionNames and SampleAnalyzerPlugin, for Win32.DLL. llvm-svn: 212906
* PrintFunctionNames/CMakeLists.txt: Fix a comment.NAKAMURA Takumi2014-07-131-1/+1
| | | | llvm-svn: 212905
* MS ABI: Stick internal vftables in a comdat if they have RTTI dataDavid Majnemer2014-07-132-7/+6
| | | | | | | | | | | | | | | 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
* tests: use a more precise target for testsSaleem Abdulrasool2014-07-121-2/+2
| | | | llvm-svn: 212892
* Headers: add hint intrinsics to arm_acle.hSaleem Abdulrasool2014-07-122-4/+30
| | | | | | | | 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-123-0/+69
| | | | | | | 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-122-8/+16
| | | | | | Include section number in ARM ACLE specification for easier navigation. llvm-svn: 212887
* Add nonnull in CodeGen for __attribute__((returns_nonnull))Hal Finkel2014-07-122-0/+8
| | | | | | | 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-124-26/+46
| | | | | | | | | | | | | | | | | 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
* Require an x86 registered target for this test by splitting it outReid Kleckner2014-07-122-6/+12
| | | | | | | This is a shot in the dark to fix the hexagon bot, so I'm not 100% sure this is the issue. llvm-svn: 212871
* clang-cl: Make all x86 CPU feature flags available, such as -msse3Reid Kleckner2014-07-122-3/+5
| | | | | | | | | | | | | Ideally, we would use the /arch cl.exe flag for this stuff. Unfortunately, MSVC supports only 5 /arch flag values, which isn't nearly enough to cover all the CPU features that LLVM cares about. At the very least, we need to know about SSE3 and SSE4.1 in addition to SSE, SSE2, AVX, and AVX2. In the future we should add the relevant /arch mappings in addition to these gcc-style -m flags. llvm-svn: 212869
* Form a CallExpr from __noop without parensReid Kleckner2014-07-112-6/+36
| | | | | | | | | | | | 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-114-122/+2
| | | | | | | | | llvm::Triple::getARMCPUForArch(). Depends on llvm r212846. Suggested by Eric Christopher. llvm-svn: 212858
* Consolidate header inclusion diagnosticsAlp Toker2014-07-1113-60/+49
| | | | | | | 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-112-9/+48
| | | | | | | | | | | | | | | | 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
* oops. correct the prefix.Brad Smith2014-07-111-1/+1
| | | | llvm-svn: 212840
* MS extension: Make __noop be the integer zero, not voidReid Kleckner2014-07-113-5/+6
| | | | | | | 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-112-1/+40
| | | | llvm-svn: 212838
* [modules] When merging a class template, also merge the definition of its ↵Richard Smith2014-07-114-3/+35
| | | | | | pattern. llvm-svn: 212836
* Add nonnull in CodeGen for __attribute__((nonnull))Hal Finkel2014-07-112-0/+28
| | | | | | | | 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
* Test for warning being silencedSylvestre Ledru2014-07-111-0/+9
| | | | | | | | | | | | | | | | Summary: Added some tests to see if the new warning would be silenced with a flag. Patch by Arthur Marble <arthur@info9.net> in the context of Debian Google Summer of code 2014. Reviewers: sylvestre.ledru Reviewed By: sylvestre.ledru Differential Revision: http://reviews.llvm.org/D4475 llvm-svn: 212833
* The returns_nonnull attribute does not require a function prototype because ↵Aaron Ballman2014-07-113-3/+4
| | | | | | 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-113-1/+5
| | | | | | | - 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-113-4/+43
| | | | | | | | | | | | 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
* Tiny improvement in a test (missing quote)Sylvestre Ledru2014-07-111-1/+1
| | | | llvm-svn: 212806
* GCC compatibility: Create a Group to ignore unsupported optimization.Sylvestre Ledru2014-07-114-1/+23
| | | | | | | | | | | | 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-1133-99/+1480
| | | | 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-115-4/+18
| | | | | | | | | 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
* clang/test/CodeGenCXX/PR20038.cpp: Appease targeting msvc due to ↵NAKAMURA Takumi2014-07-111-1/+1
| | | | | | incompatibility of dw. llvm-svn: 212787
* 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-104-30/+172
| | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud