]> granicus.if.org Git - clang/log
clang
10 years agoDocument the warning triggered by the unsupported gcc optimization flags (r212805)
Sylvestre Ledru [Mon, 14 Jul 2014 18:30:23 +0000 (18:30 +0000)]
Document the warning triggered by the unsupported gcc optimization flags (r212805)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212968 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "Improve error recovery around colon."
Reid Kleckner [Mon, 14 Jul 2014 18:19:58 +0000 (18:19 +0000)]
Revert "Improve error recovery around colon."

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))

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212965 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoChange the diagnostic group for unsupported gcc optimizations added r212805
Alp Toker [Mon, 14 Jul 2014 18:11:38 +0000 (18:11 +0000)]
Change the diagnostic group for unsupported gcc optimizations added r212805

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212964 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoImprove error recovery around colon.
Serge Pavlov [Mon, 14 Jul 2014 16:42:20 +0000 (16:42 +0000)]
Improve error recovery around colon.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212957 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCodeGen: Let arrays be inputs to inline asm
David Majnemer [Mon, 14 Jul 2014 16:27:53 +0000 (16:27 +0000)]
CodeGen: Let arrays be inputs to inline asm

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212954 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: Add NOP intrinsic mapping in arm_acle.h
Yi Kong [Mon, 14 Jul 2014 15:32:29 +0000 (15:32 +0000)]
ARM: Add NOP intrinsic mapping in arm_acle.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212950 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: Implement __builtin_arm_nop intrinsic
Yi Kong [Mon, 14 Jul 2014 15:20:09 +0000 (15:20 +0000)]
ARM: Implement __builtin_arm_nop intrinsic

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212947 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ASTMatchers] Make hasOverloadedOperatorName also match freestanding overloads.
Benjamin Kramer [Mon, 14 Jul 2014 14:05:02 +0000 (14:05 +0000)]
[ASTMatchers] Make hasOverloadedOperatorName also match freestanding overloads.

Freestanding overloads are represented as FunctionDecls in the AST, make
the matcher also match them.

Differential Revision: http://reviews.llvm.org/D4493

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212940 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Improve cast detection (fix false positive).
Daniel Jasper [Mon, 14 Jul 2014 12:38:38 +0000 (12:38 +0000)]
clang-format: Improve cast detection (fix false positive).

Before:
  fn(a)(b)+1;

After:
  fn(a)(b) + 1;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212935 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[x32] Add __ILP32__ macro for ILP32 platforms
Pavel Chupin [Mon, 14 Jul 2014 09:58:10 +0000 (09:58 +0000)]
[x32] Add __ILP32__ macro for ILP32 platforms

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212931 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[CMake] Update libdeps.
NAKAMURA Takumi [Mon, 14 Jul 2014 05:01:53 +0000 (05:01 +0000)]
[CMake] Update libdeps.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212920 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[CMake] Reorder libdeps by alphabetical order.
NAKAMURA Takumi [Mon, 14 Jul 2014 04:59:27 +0000 (04:59 +0000)]
[CMake] Reorder libdeps by alphabetical order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212919 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSuperficial fix for PR20218: binding a function lvalue to a const reference to
Richard Smith [Mon, 14 Jul 2014 02:28:44 +0000 (02:28 +0000)]
Superficial fix for PR20218: binding a function lvalue to a const reference to
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212916 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove trailing spaces
Pavel Chupin [Sun, 13 Jul 2014 17:11:45 +0000 (17:11 +0000)]
Remove trailing spaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212911 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd test cases for AArch64 hints codegen
Yi Kong [Sun, 13 Jul 2014 16:17:30 +0000 (16:17 +0000)]
Add test cases for AArch64 hints codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212909 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[CMake] Give explicit dependencies to a couple of modules, PrintFunctionNames and...
NAKAMURA Takumi [Sun, 13 Jul 2014 13:40:23 +0000 (13:40 +0000)]
[CMake] Give explicit dependencies to a couple of modules, PrintFunctionNames and SampleAnalyzerPlugin, for Win32.DLL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212906 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPrintFunctionNames/CMakeLists.txt: Fix a comment.
NAKAMURA Takumi [Sun, 13 Jul 2014 13:38:55 +0000 (13:38 +0000)]
PrintFunctionNames/CMakeLists.txt: Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212905 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMS ABI: Stick internal vftables in a comdat if they have RTTI data
David Majnemer [Sun, 13 Jul 2014 05:19:56 +0000 (05:19 +0000)]
MS ABI: Stick internal vftables in a comdat if they have RTTI data

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212901 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agotests: use a more precise target for tests
Saleem Abdulrasool [Sat, 12 Jul 2014 23:40:53 +0000 (23:40 +0000)]
tests: use a more precise target for tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212892 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoHeaders: add hint intrinsics to arm_acle.h
Saleem Abdulrasool [Sat, 12 Jul 2014 23:27:26 +0000 (23:27 +0000)]
Headers: add hint intrinsics to arm_acle.h

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212891 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCodeGen: support hint intrinsics from ACLE on AArch64
Saleem Abdulrasool [Sat, 12 Jul 2014 23:27:22 +0000 (23:27 +0000)]
CodeGen: support hint intrinsics from ACLE on AArch64

This adds support for the ACLE hint intrinsics on AArch64 similar to ARM.  This
is required to properly support ACLE on AArch64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212890 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoImprove comments of ARM ACLE header file and tests
Yi Kong [Sat, 12 Jul 2014 22:48:13 +0000 (22:48 +0000)]
Improve comments of ARM ACLE header file and tests

Include section number in ARM ACLE specification for easier navigation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212887 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd nonnull in CodeGen for __attribute__((returns_nonnull))
Hal Finkel [Sat, 12 Jul 2014 04:51:04 +0000 (04:51 +0000)]
Add nonnull in CodeGen for __attribute__((returns_nonnull))

As a follow-up to r212835, also add the LLVM nonnull function attribute when
__attribute__((returns_nonnull)) is provided.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212874 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ASan] Collect unmangled names of global variables in Clang to print them in error...
Alexey Samsonov [Sat, 12 Jul 2014 00:42:52 +0000 (00:42 +0000)]
[ASan] Collect unmangled names of global variables in Clang to print them in 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212872 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRequire an x86 registered target for this test by splitting it out
Reid Kleckner [Sat, 12 Jul 2014 00:40:59 +0000 (00:40 +0000)]
Require an x86 registered target for this test by splitting it out

This is a shot in the dark to fix the hexagon bot, so I'm not 100% sure
this is the issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212871 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-cl: Make all x86 CPU feature flags available, such as -msse3
Reid Kleckner [Sat, 12 Jul 2014 00:29:05 +0000 (00:29 +0000)]
clang-cl: Make all x86 CPU feature flags available, such as -msse3

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212869 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoForm a CallExpr from __noop without parens
Reid Kleckner [Fri, 11 Jul 2014 23:54:29 +0000 (23:54 +0000)]
Form a CallExpr from __noop without parens

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212860 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Driver] clang::driver::getARMCPUForMArch() moved to llvm::Triple::getARMCPUForArch().
Argyrios Kyrtzidis [Fri, 11 Jul 2014 23:47:48 +0000 (23:47 +0000)]
[Driver] clang::driver::getARMCPUForMArch() moved to llvm::Triple::getARMCPUForArch().

Depends on llvm r212846.
Suggested by Eric Christopher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212858 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConsolidate header inclusion diagnostics
Alp Toker [Fri, 11 Jul 2014 20:53:51 +0000 (20:53 +0000)]
Consolidate header inclusion diagnostics

Make argument orders match, unify diagnostic IDs and reword the message to be a
little less saccharine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212845 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCodeGen: Don't emit a thread-wrapper if we can't touch the backing variable
David Majnemer [Fri, 11 Jul 2014 20:28:10 +0000 (20:28 +0000)]
CodeGen: Don't emit a thread-wrapper if we can't touch the backing variable

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212841 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agooops. correct the prefix.
Brad Smith [Fri, 11 Jul 2014 20:27:39 +0000 (20:27 +0000)]
oops. correct the prefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212840 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMS extension: Make __noop be the integer zero, not void
Reid Kleckner [Fri, 11 Jul 2014 20:22:55 +0000 (20:22 +0000)]
MS extension: Make __noop be the integer zero, not void

We still don't accept '__noop;', and we don't consider __noop to be the
integer literal zero.  More work is needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212839 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoHandle SPARC float command line parameters for SPARCv9.
Brad Smith [Fri, 11 Jul 2014 20:12:08 +0000 (20:12 +0000)]
Handle SPARC float command line parameters for SPARCv9.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212838 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[modules] When merging a class template, also merge the definition of its pattern.
Richard Smith [Fri, 11 Jul 2014 18:22:58 +0000 (18:22 +0000)]
[modules] When merging a class template, also merge the definition of its pattern.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212836 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd nonnull in CodeGen for __attribute__((nonnull))
Hal Finkel [Fri, 11 Jul 2014 17:35:21 +0000 (17:35 +0000)]
Add nonnull in CodeGen for __attribute__((nonnull))

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212835 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTest for warning being silenced
Sylvestre Ledru [Fri, 11 Jul 2014 17:23:13 +0000 (17:23 +0000)]
Test for warning being silenced

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212833 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThe returns_nonnull attribute does not require a function prototype because it affect...
Aaron Ballman [Fri, 11 Jul 2014 16:31:29 +0000 (16:31 +0000)]
The returns_nonnull attribute does not require a function prototype because 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212827 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoInstantiate llvm::Registry<clang::PluginASTAction> in FrontendAction.cpp.
NAKAMURA Takumi [Fri, 11 Jul 2014 15:06:24 +0000 (15:06 +0000)]
Instantiate llvm::Registry<clang::PluginASTAction> in FrontendAction.cpp.

  - 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212821 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PATCH] [x32] Introduce -mx32 flag enforcing x32 mode for other triplets. By Pavel...
Zinovy Nis [Fri, 11 Jul 2014 14:28:45 +0000 (14:28 +0000)]
[PATCH] [x32] Introduce -mx32 flag enforcing x32 mode for other triplets. By 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212817 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTiny improvement in a test (missing quote)
Sylvestre Ledru [Fri, 11 Jul 2014 11:53:18 +0000 (11:53 +0000)]
Tiny improvement in a test (missing quote)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212806 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoGCC compatibility: Create a Group to ignore unsupported optimization.
Sylvestre Ledru [Fri, 11 Jul 2014 11:43:57 +0000 (11:43 +0000)]
GCC compatibility: Create a Group to ignore unsupported optimization.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212805 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Parsing and sema analysis for 'omp task' directive.
Alexey Bataev [Fri, 11 Jul 2014 11:25:16 +0000 (11:25 +0000)]
[OPENMP] Parsing and sema analysis for 'omp task' directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212804 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDon't assume StringRef.data() is null-terminated
Ben Langmuir [Fri, 11 Jul 2014 00:43:47 +0000 (00:43 +0000)]
Don't assume StringRef.data() is null-terminated

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212790 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTestAfterDivZeroChecker.cpp: Avoid member initializer. It is unsupported in msc17.
NAKAMURA Takumi [Fri, 11 Jul 2014 00:32:35 +0000 (00:32 +0000)]
TestAfterDivZeroChecker.cpp: Avoid member initializer. It is unsupported in msc17.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212789 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[modules] Don't try to merge template specializations by performing name lookup
Richard Smith [Fri, 11 Jul 2014 00:20:06 +0000 (00:20 +0000)]
[modules] Don't try to merge template specializations by performing name lookup
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212788 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang/test/CodeGenCXX/PR20038.cpp: Appease targeting msvc due to incompatibility...
NAKAMURA Takumi [Fri, 11 Jul 2014 00:18:29 +0000 (00:18 +0000)]
clang/test/CodeGenCXX/PR20038.cpp: Appease targeting msvc due to incompatibility of dw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212787 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReturn a FixItHint instead of taking a diagnostic builder
Reid Kleckner [Fri, 11 Jul 2014 00:16:51 +0000 (00:16 +0000)]
Return a FixItHint instead of taking a diagnostic builder

Addressing review comments from r212784.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212786 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMSVC compat: Allow lookup of friend types in enclosing namespaces
Reid Kleckner [Thu, 10 Jul 2014 23:44:52 +0000 (23:44 +0000)]
MSVC compat: Allow lookup of friend types in enclosing namespaces

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212784 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoEnable -gcolumn-info by default.
Diego Novillo [Thu, 10 Jul 2014 23:29:28 +0000 (23:29 +0000)]
Enable -gcolumn-info by default.

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212781 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd AST dumping for VarDecl init kind.
Richard Smith [Thu, 10 Jul 2014 22:54:03 +0000 (22:54 +0000)]
Add AST dumping for VarDecl init kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212774 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[UBSan] Introduce type-based blacklisting.
Alexey Samsonov [Thu, 10 Jul 2014 22:34:19 +0000 (22:34 +0000)]
[UBSan] Introduce type-based blacklisting.

Teach UBSan vptr checker to ignore technically invalud down-casts on
blacklisted types.

Based on http://reviews.llvm.org/D4407 by Byoungyoung Lee!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212770 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoBe more specific about return types of some methods.
Alexey Samsonov [Thu, 10 Jul 2014 22:18:36 +0000 (22:18 +0000)]
Be more specific about return types of some methods.

This would allow to call addCompilerUsedGlobal on some
Clang-generated globals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212767 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPR20256: don't accidentally instantiate non-dependent default-initialization as
Richard Smith [Thu, 10 Jul 2014 20:53:43 +0000 (20:53 +0000)]
PR20256: don't accidentally instantiate non-dependent default-initialization as
value-initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212764 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the dtor location issues in PR20038 harder.
David Blaikie [Thu, 10 Jul 2014 20:42:59 +0000 (20:42 +0000)]
Fix the dtor location issues in PR20038 harder.

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212761 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix (and reenable) ppc64-align-struct.c test for non-assert builds.
Ulrich Weigand [Thu, 10 Jul 2014 19:19:03 +0000 (19:19 +0000)]
Fix (and reenable) ppc64-align-struct.c test for non-assert builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212757 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove use of uniform initialization ({}) introduced in r212725 since this isn't...
David Blaikie [Thu, 10 Jul 2014 18:46:15 +0000 (18:46 +0000)]
Remove use of uniform initialization ({}) introduced in r212725 since this isn't supported in MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212754 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAvoid definining more GCC specific predefined macros in clang-cl
Ehsan Akhgari [Thu, 10 Jul 2014 18:44:24 +0000 (18:44 +0000)]
Avoid definining more GCC specific predefined macros in clang-cl

Reviewers: hansw, rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4419

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212753 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoQuick (attempted) fix for non-asserts builds for a test introduced in r212743.
David Blaikie [Thu, 10 Jul 2014 18:40:54 +0000 (18:40 +0000)]
Quick (attempted) fix for non-asserts builds for a test introduced in r212743.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212752 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Driver/Unittests] Follow up for r212666, add unit test for the newly exposed getARMC...
Argyrios Kyrtzidis [Thu, 10 Jul 2014 18:38:38 +0000 (18:38 +0000)]
[Driver/Unittests] Follow up for r212666, add unit test for the newly exposed getARMCPUForMArch() function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212751 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PowerPC] ABI support for aligned by-value aggregates
Ulrich Weigand [Thu, 10 Jul 2014 17:20:07 +0000 (17:20 +0000)]
[PowerPC] ABI support for aligned by-value aggregates

This patch adds support for respecting the ABI and type alignment
of aggregates passed by value.  Currently, all aggregates are aligned
at 8 bytes in the parameter save area.  This is incorrect for two
reasons:

- Aggregates that need alignment of 16 bytes or more should be aligned
  at 16 bytes in the parameter save area.  This is implemented by
  using an appropriate "byval align" attribute in the IR.

- Aggregates that need alignment beyond 16 bytes need to be dynamically
  realigned by the caller.  This is implemented by setting the Realign
  flag of the ABIArgInfo::getIndirect call.

In addition, when expanding a va_arg call accessing a type that is
aligned at 16 bytes in the argument save area (either one of the
aggregate types as above, or a vector type which is already aligned
at 16 bytes), code needs to align the va_list pointer accordingly.

Reviewed by Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212743 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoProvide -verify support to match "any" line for diagnostics in included files.
Andy Gibbs [Thu, 10 Jul 2014 16:43:29 +0000 (16:43 +0000)]
Provide -verify support to match "any" line for diagnostics in included files.

Allow diagnostic checks that originate in included files to be matched without necessarily determining the line number that the diagnostic occurs on.  The new syntax replaces the line number with '*'.  This extension is limited to diagnostics in included files and may be used where the include file is not part of the test-suite itself.

Expected uses are for diagnostics originating in system headers, or for users who use -verify in testing 3rd-party library code where the location of diagnostics in header files may change from revision to revision and their precise location is not important to the success of the test-case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212735 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PowerPC] ABI support for non-Altivec vector types
Ulrich Weigand [Thu, 10 Jul 2014 16:39:01 +0000 (16:39 +0000)]
[PowerPC] ABI support for non-Altivec vector types

This patch adds support for passing arguments of non-Altivec vector type
(i.e. defined via attribute ((vector_size (...)))) on powerpc64-linux.

While such types are not mentioned in the formal ABI document, this
patch implements a calling convention compatible with GCC:

- Vectors of size < 16 bytes are passed in a GPR
- Vectors of size > 16 bytes are passed via reference

Note that vector types with a number of elements that is not a power
of 2 are not supported by GCC, so there is no pre-existing ABI to
follow.  We choose to pass those (of size < 16) as if widened to the
next power of two, so they might end up in a vector register or
in a GPR.  (Sizes > 16 are always passed via reference as well.)

Reviewed by Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212734 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix clang tests to be compliant with LLVM IR aliases
David Majnemer [Thu, 10 Jul 2014 16:26:19 +0000 (16:26 +0000)]
Fix clang tests to be compliant with LLVM IR aliases

Comdat IR references were mistakenly printed for aliases when they
passed through the IR/AsmWriter code.

This makes clang's tests not check for the existance of these wrongly
printed comdat references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212733 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[analyzer] Check for code testing a variable for 0 after using it as a denominator.
Jordan Rose [Thu, 10 Jul 2014 16:10:52 +0000 (16:10 +0000)]
[analyzer] Check for code testing a variable for 0 after using it as a denominator.

This new checker, alpha.core.TestAfterDivZero, catches issues like this:

  int sum = ...
  int avg = sum / count; // potential division by zero...
  if (count == 0) { ... } // ...caught here

Because the analyzer does not necessarily explore /all/ paths through a program,
this check is restricted to only work on zero checks that immediately follow a
division operation (/ % /= %=). This could later be expanded to handle checks
dominated by a division operation but not necessarily in the same CFG block.

Patch by Anders Rönnholm! (with very minor modifications by me)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212731 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Codestyle][x32] Cosmetic codestyle fix.
Zinovy Nis [Thu, 10 Jul 2014 15:42:35 +0000 (15:42 +0000)]
[Codestyle][x32] Cosmetic codestyle fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212728 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[x32] Adding X32 target support to driver, including TargetInfo,DescriptionString...
Zinovy Nis [Thu, 10 Jul 2014 15:27:19 +0000 (15:27 +0000)]
[x32] Adding X32 target support to driver, including TargetInfo,DescriptionString, flags, paths lookup, etc. Cover changes with new tests. The author of the patch is Pavel Chupin (@pavel.v.chupin).
The changes enable "hello world" on x32 target (x86_64-*-linux-gnux32). s/isX32/IsX32/ also fixed.

Differential Revision: http://reviews.llvm.org/D4180

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212725 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][mips64r6] Add support for mips-img-linux-gnu GCC toolchains
Daniel Sanders [Thu, 10 Jul 2014 14:40:57 +0000 (14:40 +0000)]
[mips][mips64r6] Add support for mips-img-linux-gnu GCC toolchains

Summary:
* Support the multilib layout used by the mips-img-linux-gnu
* Recognize mips{,64}{,el}-img-linux-gnu as being aliases of mips-img-linux-gnu
* Use the correct dynamic linker for mips-img-linux-gnu
* Make mips32r6/mips64r6 the default CPU for mips-img-linux-gnu

Subscribers: mpf

Differential Revision: http://reviews.llvm.org/D4436

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212719 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Add support for -modd-spreg/-mno-odd-spreg
Daniel Sanders [Thu, 10 Jul 2014 10:39:51 +0000 (10:39 +0000)]
[mips] Add support for -modd-spreg/-mno-odd-spreg

Differential Revision: http://reviews.llvm.org/D4432

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212700 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd clang headers that fix machine-dependent definitions on FreeBSD 9.2
Viktor Kutuzov [Thu, 10 Jul 2014 08:43:39 +0000 (08:43 +0000)]
Add clang headers that fix machine-dependent definitions on FreeBSD 9.2
Differential Revision: http://reviews.llvm.org/D3908

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212689 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPrevent link warnings due to -Wframe-larger-than=
Alp Toker [Thu, 10 Jul 2014 02:13:29 +0000 (02:13 +0000)]
Prevent link warnings due to -Wframe-larger-than=

Although this is nominally a -W option, we actually handle it in the driver
exactly as an f-group flag that's translated directly to -mllvm.

That means f_Group (and unintuitively, not W_Group) has the semantics we want
to make it behave like a standard warning flag: no automatic forwarding, no
warning for link invocations and compile-only.

Silences diagnostics like:

  [691/1545] Linking CXX executable bin/llvm-diff
  clang-3.5: warning: argument unused during compilation: '-Wframe-larger-than=2048'

(Hopefully we can move towards handling these in the frontend but that'll
require some infrastructure work.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212670 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMS ABI: Fix __fastcall methods that return structs
Reid Kleckner [Thu, 10 Jul 2014 01:58:55 +0000 (01:58 +0000)]
MS ABI: Fix __fastcall methods that return structs

The sret paramater consumes the register after the implicit 'this'
parameter, as with other calling conventions.

Fixes PR20278, which turned out to be very easy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212669 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCleanup. No functionality change.
Richard Smith [Thu, 10 Jul 2014 01:20:17 +0000 (01:20 +0000)]
Cleanup. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212667 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.
Argyrios Kyrtzidis [Thu, 10 Jul 2014 01:03:37 +0000 (01:03 +0000)]
[Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212666 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDecouple llvm::SpecialCaseList text representation and its LLVM IR semantics.
Alexey Samsonov [Wed, 9 Jul 2014 19:40:08 +0000 (19:40 +0000)]
Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics.

Turn llvm::SpecialCaseList into a simple class that parses text files in
a specified format and knows nothing about LLVM IR. Move this class into
LLVMSupport library. Implement two users of this class:
  * DFSanABIList in DFSan instrumentation pass.
  * SanitizerBlacklist in Clang CodeGen library.
The latter will be modified to use actual source-level information from frontend
(source file names) instead of unstable LLVM IR things (LLVM Module identifier).

Remove dependency edge from ClangCodeGen/ClangDriver to LLVMTransformUtils.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212643 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSema: Allow aliases to have incomplete type
David Majnemer [Wed, 9 Jul 2014 17:15:52 +0000 (17:15 +0000)]
Sema: Allow aliases to have incomplete type

gcc supports this behavior and it is pervasively used inside the Linux
kernel.

Note that both gcc and clang will reject code that attempts to do this
in a C++ language mode.

This fixes PR17998.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212631 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][mips64r6] Implement -mips32r6 and -mips64r6 aliases to -march=mips32r6 and...
Daniel Sanders [Wed, 9 Jul 2014 14:21:18 +0000 (14:21 +0000)]
[mips][mips64r6] Implement -mips32r6 and -mips64r6 aliases to -march=mips32r6 and -march=mips64r6

Differential Revision: http://reviews.llvm.org/D4434

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212625 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoProspective legacy build system fix following r212620
Alp Toker [Wed, 9 Jul 2014 14:12:55 +0000 (14:12 +0000)]
Prospective legacy build system fix following r212620

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212624 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove dead code from r212620
Alp Toker [Wed, 9 Jul 2014 14:09:52 +0000 (14:09 +0000)]
Remove dead code from r212620

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212622 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix 'source-level' hyphenations
Alp Toker [Wed, 9 Jul 2014 14:06:35 +0000 (14:06 +0000)]
Fix 'source-level' hyphenations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212621 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agocc1as: consolidate option flags with cc1 and eliminate duplication
Alp Toker [Wed, 9 Jul 2014 14:05:11 +0000 (14:05 +0000)]
cc1as: consolidate option flags with cc1 and eliminate duplication

The clang -cc1as options are nearly a strict subset of -cc1. Instead of
duplicating the definitions and documentation, let's go ahead and share the
definitions in a similar way the current handling of combined driver and
frontend flags, eliminating some of the vestigial legacy surrounding the
assembler subcommand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212620 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][mips64r6] Define _MIPS_FPSET, __mips_fpr, and __mips_nan2008 correctly on...
Daniel Sanders [Wed, 9 Jul 2014 13:56:23 +0000 (13:56 +0000)]
[mips][mips64r6] Define _MIPS_FPSET, __mips_fpr, and __mips_nan2008 correctly on MIPS32r6/MIPS64r6

Summary:
This removes the need to pass -mnan=2008 explicitly to be able to compile
the test-suite for MIPS32r6/MIPS64r6.

Differential Revision: http://reviews.llvm.org/D4433

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212619 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] clz is defined to give 32 for zero. Similarly, dclz gives 64.
Daniel Sanders [Wed, 9 Jul 2014 13:43:19 +0000 (13:43 +0000)]
[mips] clz is defined to give 32 for zero. Similarly, dclz gives 64.

Summary:
While debugging another issue, I noticed that Mips currently specifies that the
count leading zero builtins are undefined when the input is zero. The
architecture specifications say that the clz and dclz instructions write 32 or
64 respectively when given zero.

This doesn't fix any bugs that I'm aware of but it may improve optimisation in
some cases.

Differential Revision: http://reviews.llvm.org/D4431

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212618 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Fix behavior around pointer-to-member invocations.
Daniel Jasper [Wed, 9 Jul 2014 13:07:57 +0000 (13:07 +0000)]
clang-format: Fix behavior around pointer-to-member invocations.

Before:
  (aaaaaaaaaa->*
   bbbbbbb)(aaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaa));

After:
  (aaaaaaaaaa->*bbbbbbb)(
      aaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaa));

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212617 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFixed incompatibility with MSVC builds in range-based for loops in DataRecursiveASTVi...
Alexey Bataev [Wed, 9 Jul 2014 10:00:31 +0000 (10:00 +0000)]
Fixed incompatibility with MSVC builds in range-based for loops in DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP constructs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212601 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert commit 212599.
Alexey Bataev [Wed, 9 Jul 2014 09:50:46 +0000 (09:50 +0000)]
Revert commit 212599.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212600 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Fixed incompatibility in [Data]RecursiveASTVisitor::TraverseOMPExecutableDir...
Alexey Bataev [Wed, 9 Jul 2014 09:33:29 +0000 (09:33 +0000)]
[OPENMP] Fixed incompatibility in [Data]RecursiveASTVisitor::TraverseOMPExecutableDirective method with MSVC for range-based loops.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212599 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: use LLVM's atomicrmw instructions when ldrex/strex are available.
Tim Northover [Wed, 9 Jul 2014 09:24:43 +0000 (09:24 +0000)]
ARM: use LLVM's atomicrmw instructions when ldrex/strex are available.

Having some kind of weird kernel-assisted ABI for these when the
native instructions are available appears to be (and should be) the
exception; OSs have been gradually opting in for years and the code
was getting silly.

So let LLVM decide whether it's possible/profitable to inline them by
default.

Patch by Phoebe Buckheister.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212598 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Add new option to indent wrapped function declarations.
Daniel Jasper [Wed, 9 Jul 2014 08:42:42 +0000 (08:42 +0000)]
clang-format: Add new option to indent wrapped function declarations.

Though not completely identical, make former
IndentFunctionDeclarationAfterType change this flag for backwards
compatibility (it is somewhat close in meaning and better the err'ing on
an unknown config flag).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212597 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Update flag documentation.
Daniel Jasper [Wed, 9 Jul 2014 08:19:11 +0000 (08:19 +0000)]
clang-format: Update flag documentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212594 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[OPENMP] Improved code of DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP...
Alexey Bataev [Wed, 9 Jul 2014 08:00:46 +0000 (08:00 +0000)]
[OPENMP] Improved code of DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP constructs per Tobias Grosser comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212592 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Revamp function declaration/definition indentation.
Daniel Jasper [Wed, 9 Jul 2014 07:50:33 +0000 (07:50 +0000)]
clang-format: Revamp function declaration/definition indentation.

Key changes:
- Correctly (well ...) distinguish function declarations and variable
  declarations with ()-initialization.
- Don't indent when breaking function declarations/definitions after the
  return type.
- Indent variable declarations and typedefs when breaking after the
  type.

This fixes llvm.org/PR17999.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212591 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix typos.
Nikola Smiljanic [Wed, 9 Jul 2014 05:42:35 +0000 (05:42 +0000)]
Fix typos.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212589 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-interpreter: don't check input file existence, we're in-process
Alp Toker [Wed, 9 Jul 2014 01:37:36 +0000 (01:37 +0000)]
clang-interpreter: don't check input file existence, we're in-process

This flag is set by most other tools and avoids extra stat() calls. The
frontend will diagnose anyway as it performs the check atomically while opening
files at point of use.

We could probably make Driver::CheckInputsExist default to false and only
enable it in the main 'clang' binary, or even better only perform the checks if
we know the tool is external but that needs more thought.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212585 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSimplify warning flag value handling from r206826
Alp Toker [Wed, 9 Jul 2014 01:37:24 +0000 (01:37 +0000)]
Simplify warning flag value handling from r206826

Also give the field it a more appropriate name and improve the docs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212584 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agorewrap to 80 cols, no behavior change
Nico Weber [Tue, 8 Jul 2014 23:54:25 +0000 (23:54 +0000)]
rewrap to 80 cols, no behavior change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212578 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agorewrap to 80 cols, no behavior change
Nico Weber [Tue, 8 Jul 2014 23:46:20 +0000 (23:46 +0000)]
rewrap to 80 cols, no behavior change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212574 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMS compat: Allow lookup of types from dependent bases in functions
Reid Kleckner [Tue, 8 Jul 2014 21:35:03 +0000 (21:35 +0000)]
MS compat: Allow lookup of types from dependent bases in functions

If we want to resolve the remaining FIXMEs here, we probably want to
extend the main lookup mechanism to perform lookup into dependent bases,
but we would have to tread lightly.  Adding more name lookup has major
impact on compile time.

If we did extend the main mechanism, we would add a flag to LookupResult
that allows us to find names from dependent base classes where the base
is a specialization of a known template.  The final LookupResult would
still return LookupResult::NotFoundInCurrentInstantiation, but it would
have a collection of Decls.  If we find a real lookup result, we would
clear the flag and the existing lookup results and begin accumulating
only real lookup results.

We would structure the lookup as a secondary lookup between normal
lookup and typo correction for normal compilation, but for MSVC
compatibility mode, we would always enable this extra lookup into
dependent bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212566 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove unnecessary check for NULL
Alexey Samsonov [Tue, 8 Jul 2014 20:23:18 +0000 (20:23 +0000)]
Remove unnecessary check for NULL

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212564 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agotest: merge arm-intrin into ms-intrin, fix invocation
Saleem Abdulrasool [Tue, 8 Jul 2014 20:21:29 +0000 (20:21 +0000)]
test: merge arm-intrin into ms-intrin, fix invocation

This merges the two tests into one since there is no real reason to separate
them.  It also fixes the test invocation to specify -fms-compatibility without
which we would end up without an Intrin.h header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212563 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAllow more lookup of types in dependent base classes
Reid Kleckner [Tue, 8 Jul 2014 20:05:48 +0000 (20:05 +0000)]
Allow more lookup of types in dependent base classes

MSVC appears to perform name lookup into dependent base classes when the
dependent base class has a known primary template.  This allows them to
know whether some unqualified ids are types or not, which allows them to
parse more class templates without typename keywords.

We can do the same thing when type name lookup fails, and if we find a
single type decl in one of our dependent base classes, recover as though
the user wrote 'typename MyClass::TypeFromBase'.

This allows us to parse some COM smart pointer classes in wrl/client.h
from the Windows 8 SDK.

Reviewers: rsmith

Differential Revision: http://reviews.llvm.org/D4237

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212561 91177308-0d34-0410-b5e6-96231b3b80d8