]> granicus.if.org Git - clang/log
clang
11 years agoRemove trailing whitespace.
Craig Topper [Fri, 26 Jul 2013 06:16:11 +0000 (06:16 +0000)]
Remove trailing whitespace.

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

11 years agoRemove trailing whitespace.
Craig Topper [Fri, 26 Jul 2013 05:59:26 +0000 (05:59 +0000)]
Remove trailing whitespace.

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

11 years agoFix test for Release builds.
Eli Friedman [Fri, 26 Jul 2013 02:04:44 +0000 (02:04 +0000)]
Fix test for Release builds.

Attempt 2.  Sorry about the noise.

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

11 years ago[PowerPC] Support powerpc64le as a syntax-checking target.
Bill Schmidt [Fri, 26 Jul 2013 01:36:11 +0000 (01:36 +0000)]
[PowerPC] Support powerpc64le as a syntax-checking target.

This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code.  Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing.  Code generation will otherwise be the same as
powerpc64 (big-endian), for now.

The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.

The new test case variant ensures that correct built-in defines for
little-endian code are generated.

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

11 years agoFix test for Release builds.
Eli Friedman [Fri, 26 Jul 2013 01:21:11 +0000 (01:21 +0000)]
Fix test for Release builds.

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

11 years agoTighten type-checking for vector attributes.
Eli Friedman [Fri, 26 Jul 2013 00:53:47 +0000 (00:53 +0000)]
Tighten type-checking for vector attributes.

Based on patch by Yunzhong Gao.

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

11 years agoFix gcc search for cross-compiler on Ubuntu 13.04.
Eli Friedman [Fri, 26 Jul 2013 00:53:40 +0000 (00:53 +0000)]
Fix gcc search for cross-compiler on Ubuntu 13.04.

Just more craziness to find crtbegin.o etc.

Patch by Stephen Kelly.

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

11 years agoFix GNU ObjC ABI for a message returning a struct.
Eli Friedman [Fri, 26 Jul 2013 00:53:29 +0000 (00:53 +0000)]
Fix GNU ObjC ABI for a message returning a struct.

This allows the ObjFW runtime to correctly implement message forwarding
for messages which return a struct.

Patch by Jonathan Schleifer.

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

11 years agoPartially revert r186903.
Eli Friedman [Fri, 26 Jul 2013 00:06:45 +0000 (00:06 +0000)]
Partially revert r186903.

It turns out that Plum Hall depends on us not emitting an error on
integer literals which fit into long long, but fit into
unsigned long long.  So C99 conformance requires not conforming to C99. :)

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

11 years agoMove friend warning into CXX11 warning group.
Eli Friedman [Fri, 26 Jul 2013 00:06:39 +0000 (00:06 +0000)]
Move friend warning into CXX11 warning group.

Also, fix the wording to reflect this.

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

11 years agoOptions.td: fold the NoForward flag into DriverOption
Hans Wennborg [Thu, 25 Jul 2013 23:09:00 +0000 (23:09 +0000)]
Options.td: fold the NoForward flag into DriverOption

They seemed to have the same implications, and this makes for one
less flag to worry about.

Differential Revision: http://llvm-reviews.chandlerc.com/D1219

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

11 years agoWhen we perform dependent name lookup during template instantiation, it's not
Richard Smith [Thu, 25 Jul 2013 23:08:39 +0000 (23:08 +0000)]
When we perform dependent name lookup during template instantiation, it's not
sufficient to only consider names visible at the point of instantiation,
because that may not include names that were visible when the template was
defined. More generally, if the instantiation backtrace goes through a module
M, then every declaration visible within M should be available to the
instantiation. Any of those declarations might be part of the interface that M
intended to export to a template that it instantiates.

The fix here has two parts:

1) If we find a non-visible declaration during name lookup during template
instantiation, check whether the declaration was visible from the defining
module of all entities on the active template instantiation stack. The defining
module is not the owning module in all cases: we look at the module in which a
template was defined, not the module in which it was first instantiated.

2) Perform pending instantiations at the end of a module, not at the end of the
translation unit. This is general goodness, since it significantly cuts down
the amount of redundant work that is performed in every TU importing a module,
and also implicitly adds the module containing the point of instantiation to
the set of modules checked for declarations in a lookup within a template
instantiation.

There's a known issue here with template instantiations performed while
building a module, if additional imports are added later on. I'll fix that
in a subsequent commit.

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

11 years agoOptions.td: finish comment about CompileOnly_Group
Hans Wennborg [Thu, 25 Jul 2013 22:55:46 +0000 (22:55 +0000)]
Options.td: finish comment about CompileOnly_Group

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

11 years ago[analyzer] Remove dead optimization for MaterializeTemporaryExpr.
Jordan Rose [Thu, 25 Jul 2013 22:32:35 +0000 (22:32 +0000)]
[analyzer] Remove dead optimization for MaterializeTemporaryExpr.

Previously, we tried to avoid creating new temporary object regions if
the value to be materialized itself came from a temporary object region.
However, once we became more strict about lvalues vs. rvalues (months
ago), this optimization became dead code, because the input to this
function will always be an rvalue (i.e. a symbolic value or compound
value rather than a region, at least for structs).

This would be a nice optimization to keep, but removing it makes it
simpler to reason about temporary regions.

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

11 years agoDon't forward all assembler arguments untouched to -cc1as
David Blaikie [Thu, 25 Jul 2013 21:19:01 +0000 (21:19 +0000)]
Don't forward all assembler arguments untouched to -cc1as

Use the same filtering for assembly arguments to -cc1as as we do for
-cc1, this allows a consistent (& more useful) diagnostic experience for
users (rather than getting an error from -cc1as (which a user shouldn't
really be thinking about) about --foo, they get an error from clang
about --foo in -Wa,)

I'm sort of surprised by the separation of -cc1as & the separate
argument handling, etc, but at least this removes a little bit of the
duplication.

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

11 years agoremove empty directories.
Rafael Espindola [Thu, 25 Jul 2013 19:40:15 +0000 (19:40 +0000)]
remove empty directories.

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

11 years agoRemove the mblaze backend from clang.
Rafael Espindola [Thu, 25 Jul 2013 18:42:13 +0000 (18:42 +0000)]
Remove the mblaze backend from clang.

Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html

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

11 years ago[analyzer] Add regression test for the crash in PR16664.
Jordan Rose [Thu, 25 Jul 2013 17:22:05 +0000 (17:22 +0000)]
[analyzer] Add regression test for the crash in PR16664.

This goes with r186925, which reverted Pavel's commit in r186498.

Also, add a correctness test for the future.

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

11 years ago[analyzer] Weaken assertion to account for pointer-to-integer casts.
Jordan Rose [Thu, 25 Jul 2013 17:22:02 +0000 (17:22 +0000)]
[analyzer] Weaken assertion to account for pointer-to-integer casts.

PR16690

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

11 years agoMove not past env.
Rafael Espindola [Thu, 25 Jul 2013 14:52:56 +0000 (14:52 +0000)]
Move not past env.

This only makes a difference with broken versions of env (like the one in
gnutools32) that always return 0.

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

11 years agoDon't pass %s twice to clang -cc1.
Rafael Espindola [Thu, 25 Jul 2013 13:45:29 +0000 (13:45 +0000)]
Don't pass %s twice to clang -cc1.

The reason this clang invocation was failing is that it had two %s. We would
close stdout after the first one and report a fatal error when trying to
print the second.

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

11 years agoclang-format: Fix switch/case interaction with macros.
Daniel Jasper [Thu, 25 Jul 2013 11:31:57 +0000 (11:31 +0000)]
clang-format: Fix switch/case interaction with macros.

Before:
  #define OPERATION_CASE(name) \
    case OP_name:              \
    return operations::Operation##name

  switch (OpCode) {
      CASE(Add);
      CASE(Subtract);
    default:
      return operations::Unknown;
  }

After:
  #define OPERATION_CASE(name) \
    case OP_name:              \
      return operations::Operation##name;

  switch (OpCode) {
    CASE(Add);
    CASE(Subtract);
    default:
      return operations::Unknown;
  }

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

11 years agoUse memoization for has()-matcher.
Daniel Jasper [Thu, 25 Jul 2013 09:32:14 +0000 (09:32 +0000)]
Use memoization for has()-matcher.

In TUs with large classes, a matcher like

  methodDecl(ofClass(recordDecl(has(varDecl()))))

(finding all member functions of classes with static variables)
becomes unbearably slow otherwise.

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

11 years agoFix incorrect documentation generation for type matchers.
Manuel Klimek [Thu, 25 Jul 2013 06:05:50 +0000 (06:05 +0000)]
Fix incorrect documentation generation for type matchers.

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

11 years agoAvoid recursions when the parser finds out that it has too many brackets.
Rafael Espindola [Thu, 25 Jul 2013 02:11:20 +0000 (02:11 +0000)]
Avoid recursions when the parser finds out that it has too many brackets.

BalancedDelimiterTracker::diagnoseOverflow calls P.SkipUntil, and before this
patch P.SkipUnti is recursive, causing problems on systems with small stacks.
This patch fixes it by making P.SkipUnti non recursive when just looking for
eof.

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

11 years agoAdd another C++14 constexpr test case.
Richard Smith [Thu, 25 Jul 2013 01:53:54 +0000 (01:53 +0000)]
Add another C++14 constexpr test case.

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

11 years agoReplace the "NoFramePointerElimNonLeaf" target option with a function attribute.
Bill Wendling [Thu, 25 Jul 2013 00:32:41 +0000 (00:32 +0000)]
Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.

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

11 years agoDebug Info: Fine-tune the simple return expression location handling to
Adrian Prantl [Thu, 25 Jul 2013 00:23:42 +0000 (00:23 +0000)]
Debug Info: Fine-tune the simple return expression location handling to
only affect functions without a separate return block. This fixes the
linetable for void functions with cleanups and multiple returns.

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

11 years agotypo.
Adrian Prantl [Thu, 25 Jul 2013 00:23:37 +0000 (00:23 +0000)]
typo.

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

11 years agoDocumentation parsing: if typedef name is being declared
Fariborz Jahanian [Wed, 24 Jul 2013 22:58:51 +0000 (22:58 +0000)]
Documentation parsing: if typedef name is being declared
via a macro, try using declaration's starting location.
This is improvement over not having a valid location and
dropping comment altogether. // rdar://14348912

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

11 years agoSimplify code - no functionality change.
Eli Bendersky [Wed, 24 Jul 2013 22:20:49 +0000 (22:20 +0000)]
Simplify code - no functionality change.

getToolChain().getTriple().getArch() can be replaced by getToolChain().getArch()

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

11 years agoPartial revert of r185568.
Eli Bendersky [Wed, 24 Jul 2013 21:22:01 +0000 (21:22 +0000)]
Partial revert of r185568.

r186899 and r187061 added a preferred way for some architectures not to get
intrinsic generation for math builtins. So the code changes in r185568 can
now be undone (the test remains).

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

11 years agotypo.
Adrian Prantl [Wed, 24 Jul 2013 20:44:20 +0000 (20:44 +0000)]
typo.

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

11 years agoDebug Info: Fix an oversight of r186553. Ensure that the function prologue
Adrian Prantl [Wed, 24 Jul 2013 20:34:39 +0000 (20:34 +0000)]
Debug Info: Fix an oversight of r186553. Ensure that the function prologue
of an artificial function gets an artificial location as well.

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

11 years agoadd radar number to testcase.
Adrian Prantl [Wed, 24 Jul 2013 20:34:34 +0000 (20:34 +0000)]
add radar number to testcase.

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

11 years agoObjective-C migrator: some cleanup.
Fariborz Jahanian [Wed, 24 Jul 2013 19:18:37 +0000 (19:18 +0000)]
Objective-C migrator: some cleanup.
Expose static type of init/alloc/retain with
instance type as well. Ad-hoc cases are coming
next.

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

11 years agoAdd not to a command that is expected to fail.
Rafael Espindola [Wed, 24 Jul 2013 18:45:44 +0000 (18:45 +0000)]
Add not to a command that is expected to fail.

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

11 years agoObjectiveC migration: Method candidates for
Fariborz Jahanian [Wed, 24 Jul 2013 18:31:42 +0000 (18:31 +0000)]
ObjectiveC migration: Method candidates for
migrating to instancetype can have implicit 'id'
type too.

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

11 years agoPass -fno-math-builtin from the Clang driver to -cc1 for the l32 arch.
Eli Bendersky [Wed, 24 Jul 2013 18:20:14 +0000 (18:20 +0000)]
Pass -fno-math-builtin from the Clang driver to -cc1 for the l32 arch.

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

11 years agoRename feature test for lambda init-captures from cxx_generalized_capture to
Richard Smith [Wed, 24 Jul 2013 17:51:13 +0000 (17:51 +0000)]
Rename feature test for lambda init-captures from cxx_generalized_capture to
cxx_init_capture. "generalized" is neither descriptive nor future-proof. No
compatibility problems expected, since we've never advertised having this
feature.

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

11 years agoUpdate documentation to match current C++1y feature set.
Richard Smith [Wed, 24 Jul 2013 17:41:31 +0000 (17:41 +0000)]
Update documentation to match current C++1y feature set.

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

11 years agoMake test pass in Release builds, IR names don't get emitted there.
Benjamin Kramer [Wed, 24 Jul 2013 17:27:08 +0000 (17:27 +0000)]
Make test pass in Release builds, IR names don't get emitted there.

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

11 years agoUse ARM-style representation for C++ method pointers under PNaCl/Emscripten
Mark Seaborn [Wed, 24 Jul 2013 16:25:13 +0000 (16:25 +0000)]
Use ARM-style representation for C++ method pointers under PNaCl/Emscripten

Before this change, Clang uses the x86 representation for C++ method
pointers when generating code for PNaCl.  However, the resulting code
will assume that function pointers are 0 mod 2.  This assumption is
not safe for PNaCl, where function pointers could have any value
(especially in future sandboxing models).

So, switch to using the ARM representation for PNaCl code, which makes
no assumptions about the alignment of function pointers.

Since we're changing the "le32" target, this change also applies to
Emscripten.  The change is beneficial for Emscripten too.  Emscripten
has a workaround to make function pointers 0 mod 2.  This change would
allow the workaround to be removed.

See: https://code.google.com/p/nativeclient/issues/detail?id=3450

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

11 years agoSema: Minor const fixups and control flow tidying.
Benjamin Kramer [Wed, 24 Jul 2013 15:28:33 +0000 (15:28 +0000)]
Sema: Minor const fixups and control flow tidying.

No functionality change.

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

11 years agoAdd support for Adaptative matchers on the dynamic registry.
Samuel Benzaquen [Wed, 24 Jul 2013 14:48:01 +0000 (14:48 +0000)]
Add support for Adaptative matchers on the dynamic registry.

Summary:
Add support for Adaptative matchers on the dynamic registry.
Each adaptative matcher is created with a function template. We instantiate the function N times, one for each possible From type and apply the techniques used on argument overloaded and polymorphic matchers to add them to the registry.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1201

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

11 years agoclang-format: Initial (incomplete) support for the WebKit coding style.
Daniel Jasper [Wed, 24 Jul 2013 13:10:59 +0000 (13:10 +0000)]
clang-format: Initial (incomplete) support for the WebKit coding style.

This is far from implementing all the rules given by
http://www.webkit.org/coding/coding-style.html

The important new feature is the support for styles that don't have a
column limit. For such styles, clang-format will (at the moment) simply
respect the input's formatting decisions within statements.

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

11 years agoC++1y: track object lifetime during constexpr evaluation, and don't allow
Richard Smith [Wed, 24 Jul 2013 07:11:57 +0000 (07:11 +0000)]
C++1y: track object lifetime during constexpr evaluation, and don't allow
objects to be used once their lifetimes end. This completes the C++1y
constexpr extensions.

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

11 years agoUpdate docs.
Manuel Klimek [Wed, 24 Jul 2013 05:46:07 +0000 (05:46 +0000)]
Update docs.

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

11 years agoObjectiveC migration: more migration to
Fariborz Jahanian [Tue, 23 Jul 2013 23:55:55 +0000 (23:55 +0000)]
ObjectiveC migration: more migration to
instancetype of NSDictionary methods.

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

11 years agoObjectiveC migrator: start migrating to
Fariborz Jahanian [Tue, 23 Jul 2013 23:34:42 +0000 (23:34 +0000)]
ObjectiveC migrator: start migrating to
instancetype methods.

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

11 years agoObjC migrator: more knobs toward doing
Fariborz Jahanian [Tue, 23 Jul 2013 22:42:28 +0000 (22:42 +0000)]
ObjC migrator: more knobs toward doing
instancetype migration.

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

11 years ago[PowerPC64] Fix passing of single-vector-member structs to match ABI.
Bill Schmidt [Tue, 23 Jul 2013 22:15:57 +0000 (22:15 +0000)]
[PowerPC64] Fix passing of single-vector-member structs to match ABI.

The 64-bit PowerPC ELF ABI requires a struct that contains a single
vector member to be passed in a vector register as though the wrapping
struct were not present.  Instead we were passing this as a byval
struct.

The same logic was already present for floating-point arguments, so
this patch just extends the logic to handle vector types.  The new
test case verifies that clang coerces the parameter and annotates it
as inreg.

Thanks,
Bill

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

11 years agoRemove HelpText for -fno-diagnostics-show-note-include-stack
Hans Wennborg [Tue, 23 Jul 2013 21:17:14 +0000 (21:17 +0000)]
Remove HelpText for -fno-diagnostics-show-note-include-stack

The help text was wrong, and we already provide help text on the
option that actually changes anything, i.e. -fdiagnostics-show-note-include-stack.

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

11 years agoChanged "an macro" to "a macro" in diagnostic note.
Richard Trieu [Tue, 23 Jul 2013 21:06:45 +0000 (21:06 +0000)]
Changed "an macro" to "a macro" in diagnostic note.

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

11 years agoRemove support for CCC_ADD_ARGS. QA_OVERRIDE_GCC3_OPTIONS supersedes it.
Rafael Espindola [Tue, 23 Jul 2013 19:55:06 +0000 (19:55 +0000)]
Remove support for CCC_ADD_ARGS. QA_OVERRIDE_GCC3_OPTIONS supersedes it.

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

11 years agoRemoving a number of individual run lines and replacing them with single line test...
Aaron Ballman [Tue, 23 Jul 2013 19:37:19 +0000 (19:37 +0000)]
Removing a number of individual run lines and replacing them with single line test cases.  This reduces the number of test runs, provides the same coverage, and allows us to test that the attribute names are included in the diagnostic.

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

11 years agoObjC migrator: Define family of methods
Fariborz Jahanian [Tue, 23 Jul 2013 19:31:17 +0000 (19:31 +0000)]
ObjC migrator: Define family of methods
which are candidate for migrating to
'instancetype'. wip.

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

11 years agoAdded the attribute name to the err_attribute_wrong_number_arguments diagnostic for...
Aaron Ballman [Tue, 23 Jul 2013 19:30:11 +0000 (19:30 +0000)]
Added the attribute name to the err_attribute_wrong_number_arguments diagnostic for clarity; updated almost all of the affected test cases.

Thanks to Fariborz Jahanian for the suggestion!

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

11 years agoRemoved useless source loc field in UnresolvedUsingTypenameDecl node.
Enea Zaffanella [Tue, 23 Jul 2013 18:25:15 +0000 (18:25 +0000)]
Removed useless source loc field in UnresolvedUsingTypenameDecl node.

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

11 years agoAdd new diagnostic messages when too many arguments are presented to a
Richard Trieu [Tue, 23 Jul 2013 18:01:49 +0000 (18:01 +0000)]
Add new diagnostic messages when too many arguments are presented to a
function-like macro.  Clang will attempt to correct the arguments by detecting
braced initializer lists:

1) If possible, suggest parentheses around arguments
containing braced lists which will give the proper number of arguments.
2) If a braced list is detected at the start of a macro argument, it cannot be
corrected by parentheses.  Instead, just point out the location of these
braced lists.

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

11 years agoRemove the -ccc-echo option that is now unused.
Rafael Espindola [Tue, 23 Jul 2013 17:58:53 +0000 (17:58 +0000)]
Remove the -ccc-echo option that is now unused.

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

11 years ago[libclang] Expose the rest of the array types.
Argyrios Kyrtzidis [Tue, 23 Jul 2013 17:36:21 +0000 (17:36 +0000)]
[libclang] Expose the rest of the array types.

Patch by Che-Liang Chiou!

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

11 years agoGoing back to using getName for consistency.
Aaron Ballman [Tue, 23 Jul 2013 17:35:26 +0000 (17:35 +0000)]
Going back to using getName for consistency.

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

11 years agoExpand test/Driver/at_file.c test to check that PR16209 is fixed.
Hans Wennborg [Tue, 23 Jul 2013 17:26:56 +0000 (17:26 +0000)]
Expand test/Driver/at_file.c test to check that PR16209 is fixed.

It was fixed by r186603.

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

11 years agoRemove unused diagnostics.
Benjamin Kramer [Tue, 23 Jul 2013 16:18:53 +0000 (16:18 +0000)]
Remove unused diagnostics.

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

11 years agoRemove line number from test/Analysis/crash-trace.c.
Jordan Rose [Tue, 23 Jul 2013 16:12:18 +0000 (16:12 +0000)]
Remove line number from test/Analysis/crash-trace.c.

...and hopefully, finally, unbreak buildbots.

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

11 years agoMark test/Analysis/crash-trace.c as requiring crash recovery.
Jordan Rose [Tue, 23 Jul 2013 16:02:54 +0000 (16:02 +0000)]
Mark test/Analysis/crash-trace.c as requiring crash recovery.

This plus Rafael's fix at r186943 should keep all the buildbots happy.

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

11 years agoConvert another test to -###.
Rafael Espindola [Tue, 23 Jul 2013 15:57:21 +0000 (15:57 +0000)]
Convert another test to -###.

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

11 years agoFixing the build bots from the previous commit.
Aaron Ballman [Tue, 23 Jul 2013 15:21:34 +0000 (15:21 +0000)]
Fixing the build bots from the previous commit.

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

11 years agoAdd missing quotes for -###.
Rafael Espindola [Tue, 23 Jul 2013 15:20:22 +0000 (15:20 +0000)]
Add missing quotes for -###.

Sorry about forgetting to include this in the previous patch.

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

11 years agoUse -### instead of -ccc-echo.
Rafael Espindola [Tue, 23 Jul 2013 15:17:51 +0000 (15:17 +0000)]
Use -### instead of -ccc-echo.

This is still a fairly odd test. Clang wants to run gcc for assembling. At
least with -### it only prints that instead of actually trying to run it with
-ccc-echo.

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

11 years agoReplacing some manual diagnostic checks with an existing helper method. Adding missi...
Aaron Ballman [Tue, 23 Jul 2013 15:16:00 +0000 (15:16 +0000)]
Replacing some manual diagnostic checks with an existing helper method.  Adding missing test cases for the diagnostics.

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

11 years agoRun %clang_cc1, it is the one that actually crashes.
Rafael Espindola [Tue, 23 Jul 2013 15:02:28 +0000 (15:02 +0000)]
Run %clang_cc1, it is the one that actually crashes.

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

11 years agoRemoved a redundant diagnostic and replaced it with a more standard one. Added a...
Aaron Ballman [Tue, 23 Jul 2013 14:54:24 +0000 (14:54 +0000)]
Removed a redundant diagnostic and replaced it with a more standard one.  Added a test case for the diagnostic.

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

11 years agoConsolidate several attribute argument diagnostics into a single, selectable diagnost...
Aaron Ballman [Tue, 23 Jul 2013 14:03:57 +0000 (14:03 +0000)]
Consolidate several attribute argument diagnostics into a single, selectable diagnostic.  This makes the diagnostic more consistent.

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

11 years agoCorrecting the NSObject and Overloadable attribute diagnostics so that the count...
Aaron Ballman [Tue, 23 Jul 2013 12:13:14 +0000 (12:13 +0000)]
Correcting the NSObject and Overloadable attribute diagnostics so that the count reported matches reality.

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

11 years agoC++1y literal suffix support:
Richard Smith [Tue, 23 Jul 2013 08:14:48 +0000 (08:14 +0000)]
C++1y literal suffix support:
 * Allow ns, us, ms, s, min, h as numeric ud-suffixes
 * Allow s as string ud-suffix

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

11 years ago[analyzer] Enable pseudo-destructor expressions.
Jordan Rose [Tue, 23 Jul 2013 02:15:20 +0000 (02:15 +0000)]
[analyzer] Enable pseudo-destructor expressions.

These are cases where a scalar type is "destructed", usually due to
template instantiation (e.g. "obj.~T()", where 'T' is 'int'). This has
no actual effect and the analyzer should just skip over it.

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

11 years ago[analyzer] Add test for crash tracing (r186639)
Jordan Rose [Tue, 23 Jul 2013 02:15:16 +0000 (02:15 +0000)]
[analyzer] Add test for crash tracing (r186639)

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

11 years agoRevert "[analyzer] Add very limited support for temporary destructors"
Jordan Rose [Tue, 23 Jul 2013 02:15:11 +0000 (02:15 +0000)]
Revert "[analyzer] Add very limited support for temporary destructors"

The analyzer doesn't currently expect CFG blocks with terminators to be
empty, but this can happen when generating conditional destructors for
a complex logical expression, such as (a && (b || Temp{})). Moreover,
the branch conditions for these expressions are not persisted in the
state. Even for handling noreturn destructors this needs more work.

This reverts r186498.

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

11 years agoError on more illegal kernel argument types for OpenCL
Matt Arsenault [Tue, 23 Jul 2013 01:23:36 +0000 (01:23 +0000)]
Error on more illegal kernel argument types for OpenCL

bool, half, pointers and structs / unions containing any
of these are not allowed. Does not yet reject size_t and
related integer types that are also disallowed.

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

11 years agoMake the nomathbuiltin.c test less demanding.
Eli Bendersky [Tue, 23 Jul 2013 01:09:17 +0000 (01:09 +0000)]
Make the nomathbuiltin.c test less demanding.

This should hopefully unbreak the Windows bots at http://bb.pgr.jp

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

11 years agoFurther simplify test case from r186894
David Blaikie [Tue, 23 Jul 2013 01:01:17 +0000 (01:01 +0000)]
Further simplify test case from r186894

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

11 years agoIntegers which are too large should be an error.
Eli Friedman [Tue, 23 Jul 2013 00:25:18 +0000 (00:25 +0000)]
Integers which are too large should be an error.

Switch some warnings over to errors which should never have been warnings
in the first place.  (Also, a minor fix to the preprocessor rules for
integer literals while I'm here.)

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

11 years agoSimplify testcase.
Adrian Prantl [Tue, 23 Jul 2013 00:21:48 +0000 (00:21 +0000)]
Simplify testcase.
rdar://problem/14386148

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

11 years agoAdd a -fno-math-builtin option to the Clang -cc1
Eli Bendersky [Tue, 23 Jul 2013 00:13:01 +0000 (00:13 +0000)]
Add a -fno-math-builtin option to the Clang -cc1

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

11 years agoImplement a better fix for r186894 by setting the appropriate type for __byref_variab...
Adrian Prantl [Tue, 23 Jul 2013 00:12:14 +0000 (00:12 +0000)]
Implement a better fix for r186894 by setting the appropriate type for __byref_variable_layout.

rdar://problem/14386148

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

11 years agoObjectiveC migration. Better handle migration to conforming
Fariborz Jahanian [Mon, 22 Jul 2013 23:50:04 +0000 (23:50 +0000)]
ObjectiveC migration. Better handle migration to conforming
protocols by ignoring cases where all protocol properties
and methods are optional.

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

11 years agoDebug Info: Acknowledge the alignment when locating byref block variables.
Adrian Prantl [Mon, 22 Jul 2013 23:44:26 +0000 (23:44 +0000)]
Debug Info: Acknowledge the alignment when locating byref block variables.
Fixes rdar://problem/14386148

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

11 years agoTestcase for PR16673.
Eli Friedman [Mon, 22 Jul 2013 23:30:13 +0000 (23:30 +0000)]
Testcase for PR16673.

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

11 years agoDon't emit open-paren fixit without close-paren.
Eli Friedman [Mon, 22 Jul 2013 23:09:39 +0000 (23:09 +0000)]
Don't emit open-paren fixit without close-paren.

getLocForEndOfToken() isn't guaranteed to succeed; if it doesn't, make sure
we do something sane.

Fixes PR16673.  I'm not sure how to write a testcase for this short of grepping
through the diagnostic output.

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

11 years agoRevert commit 186833 (no longer needed after the fix in 186859).
Enea Zaffanella [Mon, 22 Jul 2013 20:58:30 +0000 (20:58 +0000)]
Revert commit 186833 (no longer needed after the fix in 186859).

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

11 years agoMake modules depend on the compiler's own module.map, as a proxy for the compiler...
Douglas Gregor [Mon, 22 Jul 2013 20:48:33 +0000 (20:48 +0000)]
Make modules depend on the compiler's own module.map, as a proxy for the compiler itself.

The headers in the compiler's own resource include directory are
system headers, which means we don't stat() them eagerly when loading
a module. Use module.map as a proxy for these headers and the compiler
itself. Fixes <rdar://problem/13856838>.

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

11 years agoUse the updated name for the attribute.
Bill Wendling [Mon, 22 Jul 2013 20:15:41 +0000 (20:15 +0000)]
Use the updated name for the attribute.

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

11 years agoFixed implementation of C89 6.5.7 p3.
Enea Zaffanella [Mon, 22 Jul 2013 19:10:20 +0000 (19:10 +0000)]
Fixed implementation of C89 6.5.7 p3.
Warning should be emitted only for InitListExpr nodes.

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

11 years agoObjective-C migration: Use NS_OPTIONS when enumerators
Fariborz Jahanian [Mon, 22 Jul 2013 18:53:45 +0000 (18:53 +0000)]
Objective-C migration: Use NS_OPTIONS when enumerators
have shift/bitwise operators or are power of 2.

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

11 years ago[arcmt] Only disable ARC in the second compilation if there were actually ARC errors...
Argyrios Kyrtzidis [Mon, 22 Jul 2013 18:13:54 +0000 (18:13 +0000)]
[arcmt] Only disable ARC in the second compilation if there were actually ARC errors in the checking phase.

rdar://14490204

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

11 years agoAdd testcase for PR16134, which no longer crashes with ToT.
Richard Smith [Mon, 22 Jul 2013 18:09:32 +0000 (18:09 +0000)]
Add testcase for PR16134, which no longer crashes with ToT.

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

11 years agoUpdate comment to refer to core issue number.
Richard Smith [Mon, 22 Jul 2013 18:06:23 +0000 (18:06 +0000)]
Update comment to refer to core issue number.

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

11 years agoThis test was missing its -verify argument.
Aaron Ballman [Mon, 22 Jul 2013 17:55:04 +0000 (17:55 +0000)]
This test was missing its -verify argument.

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