Aaron Ballman [Sat, 8 Nov 2014 17:07:15 +0000 (17:07 +0000)]
Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensure that nested namespace definitions are diagnosed properly. Both changes are motivated by post-commit feedback from r221580.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221581
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 8 Nov 2014 15:33:35 +0000 (15:33 +0000)]
[c++1z] Support for attributes on namespaces and enumerators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221580
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 8 Nov 2014 06:08:42 +0000 (06:08 +0000)]
[c++1z] Support for u8 character literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221576
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 8 Nov 2014 05:37:34 +0000 (05:37 +0000)]
[c++1z] Implement nested-namespace-definitions.
This allows 'namespace A::B { ... }' as a shorthand for 'namespace A {
namespace B { ... } }'. We already supported this correctly for error recovery;
promote that support to a full implementation.
This is not the right implementation: we do not maintain source fidelity
because we desugar the nested namespace definition in the parser. This is
tricky to avoid, since the definition genuinely does inject one named
entity per level in the namespace name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221574
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 8 Nov 2014 05:07:16 +0000 (05:07 +0000)]
[c++1z] N4295: fold-expressions.
This is a new form of expression of the form:
(expr op ... op expr)
where one of the exprs is a parameter pack. It expands into
(expr1 op (expr2onwards op ... op expr))
(and likewise if the pack is on the right). The non-pack operand can be
omitted; in that case, an empty pack gives a fallback value or an error,
depending on the operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221573
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Sat, 8 Nov 2014 00:34:30 +0000 (00:34 +0000)]
Check module signature when the module has already been loaded
We may need to verify the signature on subsequent imports as well, just
like we verify the size/modtime:
@import A;
@import B; // imports A
@import C; // imports A
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221569
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 8 Nov 2014 00:23:55 +0000 (00:23 +0000)]
Fixed a buildbot failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221568
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Sat, 8 Nov 2014 00:06:39 +0000 (00:06 +0000)]
Fix unintended fallthrough in ASTReader
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221567
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 7 Nov 2014 23:51:15 +0000 (23:51 +0000)]
[Objective-C Sema]. Issue availability/deprecated warning when
there is a uinque method found when message is sent to receiver
of 'id' type. // rdar://
18848183
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221562
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 7 Nov 2014 22:30:50 +0000 (22:30 +0000)]
ARM ABI: simplify decisions on whether args can be expanded.
Homogeneous aggregates on AAPCS_VFP ARM need to be passed *without* being
flattened (e.g. [2 x float] rather than "float, float") for various weird ABI
reasons. However, this isn't the case for anything else; further, we know at
the ABIArgInfo::getDirect callsites whether this flattening is allowed.
So, we can get more unified ARM code, with a simpler Clang, by just using that
knowledge directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221559
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 7 Nov 2014 22:29:38 +0000 (22:29 +0000)]
Introduce a SanitizerKind enum to LangOptions.
Use the bitmask to store the set of enabled sanitizers instead of a
bitfield. On the negative side, it makes syntax for querying the
set of enabled sanitizers a bit more clunky. On the positive side, we
will be able to use SanitizerKind to eventually implement the
new semantics for -fsanitize-recover= flag, that would allow us
to make some sanitizers recoverable, and some non-recoverable.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221558
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Brecka [Fri, 7 Nov 2014 22:27:43 +0000 (22:27 +0000)]
Use @rpath for ASan dylib in Makefiles
Reviewed at http://reviews.llvm.org/D6176
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221557
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 7 Nov 2014 21:30:32 +0000 (21:30 +0000)]
Fix style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221546
91177308-0d34-0410-b5e6-
96231b3b80d8
Samuel Antao [Fri, 7 Nov 2014 17:48:03 +0000 (17:48 +0000)]
Fix clash of gcc toolchains in hexagon driver regression tests.
If clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by -ccc-install-dir. This causes several regression tests to fail as they will be using an unexpected path. Adding the switch --gcc-toolchain="" in each test command is not enough as the hexagon toolchain implementation in the driver is not evaluating this argument. This commit modifies the hexagon toolchain to take the --gcc-toolchain="" argument into account when deciding the toolchain path, similarly to what is already done for other targets toolchains. Additionally, the faulty regression tests are modified in order to --gcc-toolchain="" be passed to the commands.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221535
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 7 Nov 2014 16:47:05 +0000 (16:47 +0000)]
Revert r221404 which caused lldb to not display
vararg expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221533
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 7 Nov 2014 14:11:14 +0000 (14:11 +0000)]
Improve comments in vtordisp tests: fix a typo, add a bit more clarity
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221524
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 7 Nov 2014 07:26:38 +0000 (07:26 +0000)]
CodeGen, Itanium: Properly dllimport RTTI data
We would blindly assume that RTTI data should have the same linkage as
the vtable because we didn't think the RTTI data was external. This
oversight stemmed because we didn't take dllimport into account.
This fixes PR21512.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221511
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 6 Nov 2014 21:12:06 +0000 (21:12 +0000)]
Return a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...
... instead of a DIScope that might wrap something that's not actually
a DIScope (eg. a DIGlobalVariable);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221481
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Thu, 6 Nov 2014 14:59:30 +0000 (14:59 +0000)]
Remove references to the cortex-a9-mp CPU.
This CPU definition is redundant. The Cortex-A9 is defined as
supporting multiprocessing extensions. Remove references to this CPU.
This CPU was recently removed from LLVM. See http://reviews.llvm.org/D6057
Change-Id: I62ae7cc656fcae54fbaefc4b6976e77e694a8678
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221458
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 13:30:38 +0000 (13:30 +0000)]
Don't manually insert L prefixes.
Simply marking the symbol private conveys the desire to hide them to LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221451
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 6 Nov 2014 12:08:57 +0000 (12:08 +0000)]
[X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add missing checks to test for target features.
This patch simplifies how default target features are set for AMD bdver2
and bdver1. In particular, method 'getDefaultFeatures' now implements a
fallthrough from case 'CK_BDVER2' to case 'CK_BDVER1'.
That is because 'bdver2' has the same features available in bdver1 plus
BMI, FMA, F16C and TBM.
This patch also adds missing checks for predefined macros in test
predefined-arch-macros.c. In the case of BTVER2, the test now also checks
for F16C, BMI and PCLMUL. In the case of BDVER3 and BDVER4, the test now
also checks for the presence of FSGSBASE.
Differential Revision: http://reviews.llvm.org/D6134
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221449
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 6 Nov 2014 10:10:50 +0000 (10:10 +0000)]
Fix for exception specification mismatch in explicit instantiation.
According to C++ standard if an exception-specification is specified in an explicit instantiation directive, it shall be compatible with the exception-specifications of other declarations of that function. This patch adds checks for this.
Differential Revision: http://reviews.llvm.org/D5822
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221448
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 6 Nov 2014 05:52:19 +0000 (05:52 +0000)]
[X86] Use fallthroughs to reduce the number of calls to setFeatureEnabled for different CPUs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221437
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 04:56:05 +0000 (04:56 +0000)]
Use FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221435
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 04:48:05 +0000 (04:48 +0000)]
Delete dead test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221434
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 5 Nov 2014 23:58:55 +0000 (23:58 +0000)]
Patch for small addition to availability attribute.
This is to accept "NA" in place of vesion number for availability
attribute. Used on introduced=NA to mean unavailable
and deprecated=NA to mean nothing (not deprecated).
rdar://
18804883
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221417
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 5 Nov 2014 23:51:45 +0000 (23:51 +0000)]
cmake: Only export targets in the standalone build
Trying to fix bots that didn't like the fact that I exported targets
that depended on LLVM without exporting targets from LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221415
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 5 Nov 2014 23:14:59 +0000 (23:14 +0000)]
Make it easier to build against a pre-built Clang package with CMake
Installing <prefix>/share/clang/cmake/ClangConfig.cmake makes CMake's
builtin find_package() utility work with Clang. This also allows
downstream consumers of Clang to statically link against libraries like
clangAST and have that pull in dependencies like clangBasic and
LLVMSupport.
See the CMake docs on packages:
http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221411
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Wed, 5 Nov 2014 23:09:28 +0000 (23:09 +0000)]
Thread Safety Analysis: move warnings on range-based for loops out of beta
and into -Wthread-safety.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221410
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 5 Nov 2014 21:50:22 +0000 (21:50 +0000)]
This patch fixes a crash after rebuilding call AST of
an __unknown_anytype(...). In this case, we rebuild the
vararg function type specially to convert the call expression
to something that IRGen can handle. However, FunctionDecl
as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and
results in crash when accessing its params later on. This
patch fixes the crash by rebuilding the FunctionDecl to match
its new resolved type. rdar://
15297105.
John McCall, please review post-commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221404
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 5 Nov 2014 20:30:55 +0000 (20:30 +0000)]
cmake: Conditionalize CodeGen's dependency on intrinsics_gen
Custom targets in cmake cannot be exported, and this dependency is only
needed in the combined build to ensure that Intrinsics.gen is created
before compiling CodeGen. In the standalone, all of LLVM is build first.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221391
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 5 Nov 2014 19:19:04 +0000 (19:19 +0000)]
[DebugInfo] Do not record artificial global initializer functions in the DeclCache.
When we are generating the global initializer functions, we call
CGDebugInfo::EmitFunctionStart() with a valid decl which is describing
the initialized global variable. Do not update the DeclCache with this
key as it will overwrite the the cached variable DIGlobalVariable with
the newly created artificial DISubprogram.
One could wonder if we should put artificial subprograms in the DIE tree
at all (there are vaild uses for them carrying line information though).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221385
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 18:16:35 +0000 (18:16 +0000)]
IR: MDNode => Value: Update for LLVM API change in r221375
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221376
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 5 Nov 2014 17:22:31 +0000 (17:22 +0000)]
Revert "clang-format: [js] Updates to Google's JavaScript style."
This reverts commit
eefd2eaad43c5c2b17953ae7ed1e72b28e696f7b.
Apparently, this change was a bit premature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221365
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Wed, 5 Nov 2014 16:43:18 +0000 (16:43 +0000)]
Remove superceded warning warn_forgotten_module_header
This DefaultIgnore warning under -Wincomplete-module was firing on
any module map files that happened to be parsed (it's only supposed to
fire on headers), and it has been superceded by
-Wnon-modular-include-in-module anyway.
For compatibility, I rewired -Wincomplete-module to imply
-Wnon-modular-include-in-module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221357
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 5 Nov 2014 14:04:25 +0000 (14:04 +0000)]
Support LLVM_BUILD_STATIC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221346
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Wilson [Wed, 5 Nov 2014 13:54:21 +0000 (13:54 +0000)]
MS ABI: Correctly mangle CV qualifiers from typedefs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221344
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 5 Nov 2014 10:55:36 +0000 (10:55 +0000)]
clang-format: Add test to prevent regression in r221125.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221339
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 5 Nov 2014 10:48:04 +0000 (10:48 +0000)]
clang-format: Improve free-standing macro detection.
Before:
SOME_WEIRD_LOG_MACRO
<< "Something long enough to cause a line break";
After:
SOME_WEIRD_LOG_MACRO
<< "Something long enough to cause a line break";
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221338
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 5 Nov 2014 05:04:00 +0000 (05:04 +0000)]
Mark darwin-debug-flags.c as REQUIRES:shell, due to quoting issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221332
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 5 Nov 2014 04:32:54 +0000 (04:32 +0000)]
clang-format: Make it possible to (require 'clang-format)
This makes the emacs integration ``provide`` a clang-format feature,
so that a .emacs can ``require`` it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221330
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 5 Nov 2014 01:01:30 +0000 (01:01 +0000)]
Debug info: Emit the correct type for the __FuncPtr field in a block
descriptor.
rdar://problem/
15984431
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221326
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Takata [Wed, 5 Nov 2014 00:09:29 +0000 (00:09 +0000)]
Filter out non-static class members when correcting non-member-references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221319
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Brecka [Tue, 4 Nov 2014 23:38:57 +0000 (23:38 +0000)]
Fix the test failure on Windows introduced by r221279.
http://reviews.llvm.org/D6018
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221316
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 4 Nov 2014 22:28:48 +0000 (22:28 +0000)]
Use backslashes to escape spaces and other backslashes in -dwarf-debug-flags.
The command line options are specified in a space-separated list that is an
argument to -dwarf-debug-flags, so that breaks if there are spaces in the
options. This feature came from Apple's internal version of GCC, so I went back
to check how llvm-gcc handled this and matched that behavior.
rdar://problem/
18775420
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221309
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 4 Nov 2014 20:26:01 +0000 (20:26 +0000)]
Make helper function static. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221290
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 4 Nov 2014 18:49:15 +0000 (18:49 +0000)]
Since the file has both ppc and ppc64 tests in it rename it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221285
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 4 Nov 2014 18:48:20 +0000 (18:48 +0000)]
Rewrite the test to not require asserts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221284
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Brecka [Tue, 4 Nov 2014 17:35:17 +0000 (17:35 +0000)]
Use @rpath as LC_ID_DYLIB for ASan dylib on OS X
Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library.
Reviewed at http://reviews.llvm.org/D6018
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221279
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 4 Nov 2014 14:54:37 +0000 (14:54 +0000)]
Re-enable this test on Windows since it passes with GnuWin32 env.exe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221271
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 13:41:33 +0000 (13:41 +0000)]
Remove "REQUIRES:shell" from tests. They work for me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221269
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 13:32:29 +0000 (13:32 +0000)]
clang/test/Tooling: Remove mention to PR15590 out of a couple of tests. They are suppressed with another issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221267
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 13:32:17 +0000 (13:32 +0000)]
clang/test/Tooling: [PR15590] Avoid backslashes in JSON. Should work on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221266
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 13:05:23 +0000 (13:05 +0000)]
clang/test/VFS/umbrella-mismatch.m: Let it work on win32 to avoid backslashes in yaml.
FIXME: Is it intentional? s;OUT_DIR;%/S/Inputs;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221264
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 13:05:10 +0000 (13:05 +0000)]
clang/test/Coverage/html-diagnostics.c: Use find(1) to avoid globbing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221263
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 12:59:18 +0000 (12:59 +0000)]
clang/test/Modules: Remove "REQUIRES:shell" since they work for me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221261
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Nov 2014 12:41:02 +0000 (12:41 +0000)]
clang-format: Use identifier table for keywords in other languages.
Slightly easier to write, more efficient and prevents bugs by
misspelling them.
No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221259
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Nov 2014 10:53:14 +0000 (10:53 +0000)]
clang-format: [Java] Fix class declaration line breaks.
Before:
@SomeAnnotation()
abstract
class
aaaaaaaaa<a> extends
bbbbbbbbbbbb<b> implements
cccccccccccc {
}
After:
@SomeAnnotation()
abstract class
aaaaaaaaa<a> extends
bbbbbbbbbbbb<b>
implements
cccccccccccc {
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221256
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Nov 2014 10:40:26 +0000 (10:40 +0000)]
clang-format: Fix vim integration if g:clang_format_binary doesn't exist
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221254
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Nov 2014 08:55:13 +0000 (08:55 +0000)]
Driver: Pass some std::strings by reference instead of value
No functional change intended. This fixes PR21463.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221249
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Tue, 4 Nov 2014 08:51:24 +0000 (08:51 +0000)]
[clang-tidy] Move -extra-arg handling to CommonOptionsProvider
Summary:
Handle -extra-arg and -extra-arg-before options in the
CommonOptionsProvider so they can be used in all clang tools. Adjust arguments
in a CompilationDatabase wrapper instead of adding ArgumentsAdjuster to the
tool.
Reviewers: djasper, klimek
Reviewed By: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6073
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221248
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 4 Nov 2014 01:30:55 +0000 (01:30 +0000)]
[llvm-api-change] Use findProgramByName.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221222
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 4 Nov 2014 01:13:43 +0000 (01:13 +0000)]
Use the new LLVM_END_WITH_NULL name
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221217
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 3 Nov 2014 23:52:09 +0000 (23:52 +0000)]
Lower __builtin_fabs* to @llvm.fabs.*
mingw64's headers implement fabs by calling __builtin_fabs, so using the
library call results in an infinite loop. If the backend legalizes
@llvm.fabs as a call to fabs later, things should work out, as the crt
provides a definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221206
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 3 Nov 2014 23:51:40 +0000 (23:51 +0000)]
Remove dead AST type argument to EmitFAbs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221205
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 3 Nov 2014 23:09:25 +0000 (23:09 +0000)]
Remove local handling of ASAN_OPTIONS and UBSAN_OPTIONS.
They are now forwarded by TestingConfig.py.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221200
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 3 Nov 2014 21:56:03 +0000 (21:56 +0000)]
Move the no-prototype calling conv check after decl merging
Now we don't warn on this code:
void __stdcall f(void);
void __stdcall f();
My previous commit regressed this functionality because I didn't update
the relevant test case which used a definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221188
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 3 Nov 2014 21:24:50 +0000 (21:24 +0000)]
Don't diagnose no-prototype callee-cleanup function definitions
We already have a warning on the call sites of code like this:
void f() { }
void g() { f(1, 2, 3); }
t.c:2:21: warning: too many arguments in call to 'f'
We can limit ourselves to diagnosing unprototyped forward declarations
of f to cut down on noise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221184
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 3 Nov 2014 19:50:48 +0000 (19:50 +0000)]
Require asserts to unbreak the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221174
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 3 Nov 2014 19:46:18 +0000 (19:46 +0000)]
Further restrict issuance of 'override' warning if method
is argument to a macro which is defined in system header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221172
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 3 Nov 2014 18:32:54 +0000 (18:32 +0000)]
Implement vaarg lowering for ppc32. Lowering of scalars and aggregates
is supported. Complex numbers are not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221170
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 3 Nov 2014 17:03:07 +0000 (17:03 +0000)]
This patch reverts r220496 which issues warning on comparing
parameters with nonnull attribute when comparison is always
true/false. Patch causes false positive when parameter is
modified in the function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221163
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 3 Nov 2014 16:51:53 +0000 (16:51 +0000)]
Emit OpenCL local global variables without zeorinitializer
Local variables are not initialized, and every target has
been (incorrectly) ignoring the unnecessary request for
zero initialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221162
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 3 Nov 2014 16:09:16 +0000 (16:09 +0000)]
Don't allow dllimport/export on classes with internal linkage (PR21399)
Trying to import or export such classes doesn't make sense, and Clang
would assert trying to export vtables for them.
This is consistent with how we treat functions with internal linkage,
but it is stricter than MSVC so we may have to back down if it breaks
real code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221160
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 3 Nov 2014 15:42:11 +0000 (15:42 +0000)]
Revert "clang-format: [Java] Allow trailing semicolons after enums."
This reverts commit
b5bdb2ef59ab922bcb4d6e843fffaee1f7f68a8c.
This doesn't really seem necessary on second though and causes problems
with C++ enum formatting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221158
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 3 Nov 2014 14:24:45 +0000 (14:24 +0000)]
Don't dllimport inline functions when targeting MinGW (PR21366)
It turns out that MinGW never dllimports of exports inline functions.
This means that code compiled with Clang would fail to link with
MinGW-compiled libraries since we might try to import functions that
are not imported.
To fix this, make Clang never dllimport inline functions when targeting
MinGW.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221154
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 3 Nov 2014 07:05:28 +0000 (07:05 +0000)]
[x86] Add cx16 feature to KNL, SKX, and CoreAVXi CPUs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221132
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 3 Nov 2014 07:05:26 +0000 (07:05 +0000)]
[x86] Realphabetize the feature string decoding function since it was mostly in alphabetical order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221131
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 3 Nov 2014 06:51:41 +0000 (06:51 +0000)]
Add FSGSBASE intrinsics to x86 intrinsic headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221130
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 3 Nov 2014 04:19:58 +0000 (04:19 +0000)]
Remove definitions from Intrin.h that already exist in one of the other x86 intrinsic headers. Add a run line with Broadwell as the cpu type to ms-intrin.cpp test to catch some of these in the future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221127
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 3 Nov 2014 03:00:42 +0000 (03:00 +0000)]
clang-format: [Java] Allow trailing semicolons after enums.
Before:
enum SomeThing { ABC, CDE }
;
After:
enum SomeThing { ABC, CDE };
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221125
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 3 Nov 2014 02:45:58 +0000 (02:45 +0000)]
clang-format: [Java] Fix more generics formatting.
Before:
< T extends B > T getInstance(Class<T> type);
After:
<T extends B> T getInstance(Class<T> type);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221124
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 3 Nov 2014 02:35:14 +0000 (02:35 +0000)]
clang-format: [Java] Fix static generic methods.
Before:
public static<R> ArrayList<R> get() {}
After:
public static <R> ArrayList<R> get() {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221122
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 3 Nov 2014 02:27:28 +0000 (02:27 +0000)]
clang-format: [Java] Fix class declaration formatting.
Before:
@SomeAnnotation()
abstract
class
aaaaaaaaaaaa extends
bbbbbbbbbbbbbbb implements
cccccccccccc {
}
After:
@SomeAnnotation()
abstract class
aaaaaaaaaaaa extends
bbbbbbbbbbbbbbb
implements
cccccccccccc {
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221121
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 2 Nov 2014 22:46:42 +0000 (22:46 +0000)]
clang-format: Fix false positive in lambda detection.
Before:
delete [] a -> b;
After:
delete[] a->b;
This fixes part of llvm.org/PR21419.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221114
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 2 Nov 2014 22:31:39 +0000 (22:31 +0000)]
clang-format: [Java] Support enums without trailing semicolon.
Before:
class SomeClass {
enum SomeThing { ABC, CDE } void f() {
}
}
After:
class SomeClass {
enum SomeThing { ABC, CDE }
void f() {
}
}
This fixed llvm.org/PR21458.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221113
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 2 Nov 2014 22:13:03 +0000 (22:13 +0000)]
clang-format: [Java] Don't break imports.
This fixes llvm.org/PR21453.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221112
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 2 Nov 2014 22:00:57 +0000 (22:00 +0000)]
clang-format: [Java] Add space between "synchronized" and "(".
Before:
synchronized(mData) {
// ...
}
After:
synchronized (mData) {
// ...
}
This fixes llvm.org/PR21455.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221110
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 2 Nov 2014 21:52:57 +0000 (21:52 +0000)]
clang-format: [Java] Support generics with "?".
Before:
@Override
public Map < String,
? > getAll() {
// ...
}
After:
@Override
public Map<String, ?> getAll() {
// ...
}
This fixes llvm.org/PR21454.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221109
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 2 Nov 2014 21:27:59 +0000 (21:27 +0000)]
clang-format: permit setting the path to clang in vimrc
If g:clang_format_path is set in the vimrc, that path will take precedence over
the hard coded path (which is reliant on the PATH environment variable). This
provides an easy mechanism for switching the selected clang-format binary during
development.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221108
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 2 Nov 2014 21:27:52 +0000 (21:27 +0000)]
docs: remove double carriage-return
The double carriage return would silence a warning due to a missing
.clang-format. Permit the error to bubble through.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221107
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 2 Nov 2014 19:21:48 +0000 (19:21 +0000)]
clang-format: [Java] Support try/catch/finally blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221104
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 2 Nov 2014 19:16:41 +0000 (19:16 +0000)]
clang-format: [Java] Don't break after extends/implements.
Before:
abstract class SomeClass extends SomeOtherClass implements
SomeInterface {}
After:
abstract class SomeClass extends SomeOtherClass
implements SomeInterface {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221103
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Sun, 2 Nov 2014 14:56:41 +0000 (14:56 +0000)]
[PowerPC] Change PPCTargetInfo::hasFeature() to use StringSwitch
Implement post-commit comment on r220989 from Eric Christopher.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221099
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 1 Nov 2014 22:50:57 +0000 (22:50 +0000)]
Add _lzcnt_u32 and _lzcnt_u64 to lzcntintrin.h to match Intel documentation names for these intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221066
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 1 Nov 2014 22:50:54 +0000 (22:50 +0000)]
Avoid undefined behavior in the x86 bmi header file by explicitly checking for 0 before calling __builtin_ctz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.cttz with defined zero behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221065
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 1 Nov 2014 22:25:23 +0000 (22:25 +0000)]
Avoid undefined behavior in the x86 lzcnt header file by explicitly checking for 0 before calling __builtin_clz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.ctlz with defined zero behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221064
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 1 Nov 2014 07:37:17 +0000 (07:37 +0000)]
CodeGen: Declutter the emitVirtualObjectDelete interface
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221043
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 1 Nov 2014 05:42:23 +0000 (05:42 +0000)]
CodeGen: Virtual dtor thunks shouldn't have this marked as 'returned'
The ARM ABI virtual destructor thunks cannot be marked as 'returned'
because they return undef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221042
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 1 Nov 2014 01:32:27 +0000 (01:32 +0000)]
clang/lib/CodeGen/TargetInfo.cpp: Fix a couple of warnings. [-Winconsistent-missing-override]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221039
91177308-0d34-0410-b5e6-
96231b3b80d8