]> granicus.if.org Git - clang/log
clang
10 years agoUse -fms-compatibility to trigger lookup into dep. bases
Reid Kleckner [Fri, 20 Sep 2013 17:04:25 +0000 (17:04 +0000)]
Use -fms-compatibility to trigger lookup into dep. bases

Update the docs for -fms-extensions and -fms-compatibility to try to
clarify the difference between the two.

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

10 years ago[analyzer] Use getParentIgnoreParenCasts instead of doing it by hand.
Jordan Rose [Fri, 20 Sep 2013 16:51:50 +0000 (16:51 +0000)]
[analyzer] Use getParentIgnoreParenCasts instead of doing it by hand.

Apart from being more compact and already implemented, this also handles the
case where the parent is null. (It does also ignore all casts, not just
implicit ones, but this is more efficient to test and in the case we care
about---a message in a PseudoObjectExpr---there should only be implicit casts
anyway.

This should fix our internal buildbot.

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

10 years ago[ASan] Fix darwin-sanitizer-ld.c to test for the new order of linker flags introduced...
Alexander Potapenko [Fri, 20 Sep 2013 08:23:19 +0000 (08:23 +0000)]
[ASan] Fix darwin-sanitizer-ld.c to test for the new order of linker flags introduced by r191076.

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

10 years ago[ASan] Do not imply -undefined dynamic_lookup when linking dylibs with -fsanitize...
Alexander Potapenko [Fri, 20 Sep 2013 08:09:51 +0000 (08:09 +0000)]
[ASan] Do not imply -undefined dynamic_lookup when linking dylibs with -fsanitize=address.
Instead add the ASan runtime to the linker command line so that only the ASan API functions can be undefined in the target library.

Fixes http://llvm.org/bugs/show_bug.cgi?id=17275

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

10 years agoModify the uninitialized field visitor to detect uninitialized use across the
Richard Trieu [Fri, 20 Sep 2013 03:03:06 +0000 (03:03 +0000)]
Modify the uninitialized field visitor to detect uninitialized use across the
fields in the class.  This allows a better checking of member intiailizers and
in class initializers in regards to initialization ordering.

For instance, this code will now produce warnings:

class A {
  int x;
  int y;
  A() : x(y) {}  // y is initialized after x, warn here
  A(int): y(x) {} // default initialization of leaves x uninitialized, warn here
};

Several test cases were updated with -Wno-uninitialized to silence this warning.

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

10 years agoTestcase I forgot to svn add in r191057.
Richard Smith [Fri, 20 Sep 2013 02:48:08 +0000 (02:48 +0000)]
Testcase I forgot to svn add in r191057.

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

10 years agoSwitch the semantic DeclContext for a block-scope declaration of a function or
Richard Smith [Fri, 20 Sep 2013 01:15:31 +0000 (01:15 +0000)]
Switch the semantic DeclContext for a block-scope declaration of a function or
variable from being the function to being the enclosing namespace scope (in
C++) or the TU (in C). This allows us to fix a selection of related issues
where we would build incorrect redeclaration chains for such declarations, and
fail to notice type mismatches.

Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern,
which is only found when searching scopes, and not found when searching
DeclContexts. Such a declaration is only made visible in its DeclContext if
there are no non-LocalExtern declarations.

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

10 years agoPR17290: Use 'false' macro in fix-it hint for initializing a variable of type
Richard Smith [Fri, 20 Sep 2013 00:27:40 +0000 (00:27 +0000)]
PR17290: Use 'false' macro in fix-it hint for initializing a variable of type
_Bool in C, if the macro is defined. Also teach FixItUtils to look at whether
the macro was defined at the source location for which it is creating a fixit,
rather than looking at whether it's defined *now*. This is especially relevant
for analysis-based warnings which are delayed until end of TU.

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

10 years agoDon't correct typos in Sema::BuildCXXNestedNameSpecifier with -fms-extensions
Kaelyn Uhrain [Thu, 19 Sep 2013 22:38:48 +0000 (22:38 +0000)]
Don't correct typos in Sema::BuildCXXNestedNameSpecifier with -fms-extensions

When -fms-extensions is enabled, the typo correction was being called here on
non-error paths (as in test/SemaTemplate/lookup-dependent-bases.cpp) and correct
compilation depended on Sema::CorrectTypo not finding a viable candidate.

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

10 years agoclang-cl: implement /fallback mode
Hans Wennborg [Thu, 19 Sep 2013 20:32:16 +0000 (20:32 +0000)]
clang-cl: implement /fallback mode

When this flag is enabled, clang-cl falls back to cl.exe if it
cannot compile the code itself for some reason.

The idea is to use this to help build projects that almost compile
with clang-cl, except for some files that can then be built with
the fallback mechanism.

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

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

10 years agoFixes a buildbot failure (was using local
Fariborz Jahanian [Thu, 19 Sep 2013 17:52:50 +0000 (17:52 +0000)]
Fixes a buildbot failure (was using local
type in template instantiation).

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

10 years agoRefinement to my previous patch for
Fariborz Jahanian [Thu, 19 Sep 2013 17:18:55 +0000 (17:18 +0000)]
Refinement to my previous patch for
objc_returns_inner_pointer on properties. // rdar://14990439

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

10 years agoclang-cl: Accept -fmsc-version so we can set it without -Xclang
Reid Kleckner [Thu, 19 Sep 2013 17:00:54 +0000 (17:00 +0000)]
clang-cl: Accept -fmsc-version so we can set it without -Xclang

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

10 years agoObjectiveC: Allow NS_RETURNS_INNER_POINTER annotation
Fariborz Jahanian [Thu, 19 Sep 2013 16:37:20 +0000 (16:37 +0000)]
ObjectiveC: Allow NS_RETURNS_INNER_POINTER annotation
of ObjectiveC properties to mean annotation of
NS_RETURNS_INNER_POINTER on its synthesized getter.
This also facilitates more migration to properties when
methods are annotated with NS_RETURNS_INNER_POINTER.
// rdar://14990439

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

10 years agoFix ifdef macro missed in previous commit
Ben Langmuir [Thu, 19 Sep 2013 14:07:14 +0000 (14:07 +0000)]
Fix ifdef macro missed in previous commit

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

10 years agoMove sha intrinsics to immintrin.h
Ben Langmuir [Thu, 19 Sep 2013 14:00:22 +0000 (14:00 +0000)]
Move sha intrinsics to immintrin.h

This is consistent with ICC and Intel's SHA-enabled GCC version.

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

10 years ago[ARMv8] Add crypto-neon-fp-armv8 -mfpu option in driver.
Amara Emerson [Thu, 19 Sep 2013 13:54:03 +0000 (13:54 +0000)]
[ARMv8] Add crypto-neon-fp-armv8 -mfpu option in driver.

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

10 years agoAdd C intrinsics for Intel SHA Extensions
Ben Langmuir [Thu, 19 Sep 2013 13:22:04 +0000 (13:22 +0000)]
Add C intrinsics for Intel SHA Extensions

Intrinsics added shaintrin.h, which is included from x86intrin.h if __SHA__ is
enabled. SHA implies SSE2, which is needed for the __m128i type.

Also add the -msha/-mno-sha option.

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

10 years agoUse -ffreestanding in ms-intrin.cpp and define size_t manually.
Reid Kleckner [Thu, 19 Sep 2013 01:54:40 +0000 (01:54 +0000)]
Use -ffreestanding in ms-intrin.cpp and define size_t manually.

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

10 years agoFix use-after-free in r190980.
Eli Friedman [Thu, 19 Sep 2013 01:51:23 +0000 (01:51 +0000)]
Fix use-after-free in r190980.

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

10 years agoUse curly braces all the way through long if/else chain for consistency and readability.
Craig Topper [Thu, 19 Sep 2013 01:13:07 +0000 (01:13 +0000)]
Use curly braces all the way through long if/else chain for consistency and readability.

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

10 years agoFix crash with cast of value-dependent expr.
Eli Friedman [Thu, 19 Sep 2013 01:12:33 +0000 (01:12 +0000)]
Fix crash with cast of value-dependent expr.

We don't really need to perform semantic analysis on the dependent expression
anyway, so just call the cast dependent.

<rdar://problem/15012610>

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

10 years agoMake Preprocessor::Lex non-recursive.
Eli Friedman [Thu, 19 Sep 2013 00:41:32 +0000 (00:41 +0000)]
Make Preprocessor::Lex non-recursive.

Before this patch, Lex() would recurse whenever the current lexer changed (e.g.
upon entry into a macro). This patch turns the recursion into a loop: the
various lex routines now don't return a token when the current lexer changes,
and at the top level Preprocessor::Lex() now loops until it finds a token.
Normally, the recursion wouldn't end up being very deep, but the recursion depth
can explode in edge cases like a bunch of consecutive macros which expand to
nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this
patch).

<rdar://problem/14569770>

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

10 years agoAvoid including <stdlib.h> in the intrin.h test
Reid Kleckner [Thu, 19 Sep 2013 00:32:11 +0000 (00:32 +0000)]
Avoid including <stdlib.h> in the intrin.h test

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

10 years agoFix ifdef ordering at the end of Intrin.h from r190965
Reid Kleckner [Thu, 19 Sep 2013 00:19:53 +0000 (00:19 +0000)]
Fix ifdef ordering at the end of Intrin.h from r190965

Test that intrin.h at least parses in C++ TUs.

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

10 years agoDisabling sse2 should disable aes and pclmul support.
Craig Topper [Thu, 19 Sep 2013 00:01:05 +0000 (00:01 +0000)]
Disabling sse2 should disable aes and pclmul support.

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

10 years agoAdd specific warning flags for GNU ext in Sema.
Eli Friedman [Wed, 18 Sep 2013 23:23:17 +0000 (23:23 +0000)]
Add specific warning flags for GNU ext in Sema.

This patch adds the following, more specific warning flags:

gnu-anonymous-struct
gnu-compound-literal-initializer
gnu-empty-struct
gnu-flexible-array-initializer
gnu-flexible-array-union-member
gnu-folding-constant
redeclared-class-member
gnu-redeclared-enum
gnu-union-cast
gnu-variable-sized-type-not-at-end

Patch by Peter Lewis.

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

10 years agoFix CharByteWidth assertion in LiteralSupport.
Eli Friedman [Wed, 18 Sep 2013 23:23:13 +0000 (23:23 +0000)]
Fix CharByteWidth assertion in LiteralSupport.

Patch by Eelis van der Weegen.

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

10 years agoRemove a bogus diagnostic preventing static data member templates from being
Richard Smith [Wed, 18 Sep 2013 23:09:24 +0000 (23:09 +0000)]
Remove a bogus diagnostic preventing static data member templates from being
defined with no initializer.

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

10 years agoFix closing brace around ifdef.
Eric Christopher [Wed, 18 Sep 2013 22:40:18 +0000 (22:40 +0000)]
Fix closing brace around ifdef.

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

10 years agoclang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.
Hans Wennborg [Wed, 18 Sep 2013 22:26:39 +0000 (22:26 +0000)]
clang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.

I put in the warnings because MSVC has them, but I don't think they're very
useful.

Clang does not warn about overriding flags in general, e.g. it's perfectly
fine to have -fomit-frame-pointer followed by -fno-omit-frame-pointer.

We should focus on warning where things get confusing, such as with the
/TP and /TC options. In "clang-cl /TC a.c /TP b.cc", the user might not
realize that the /TP flag will apply to both files, and we warn about that.

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

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

10 years agoThe intrinsics should all have C linkage.
Eric Christopher [Wed, 18 Sep 2013 22:24:01 +0000 (22:24 +0000)]
The intrinsics should all have C linkage.

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

10 years agoget rid of extra parentheses.
Adrian Prantl [Wed, 18 Sep 2013 22:18:17 +0000 (22:18 +0000)]
get rid of extra parentheses.

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

10 years agoDebug info: Explicitly set the DIVariable::isIndirect() flag for VLAs.
Adrian Prantl [Wed, 18 Sep 2013 22:08:57 +0000 (22:08 +0000)]
Debug info: Explicitly set the DIVariable::isIndirect() flag for VLAs.
This allows us to get rid of an ugly hack in the backend.
Paired commit with LLVM.

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

10 years agoRemove some dead code.
Richard Smith [Wed, 18 Sep 2013 21:55:14 +0000 (21:55 +0000)]
Remove some dead code.

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

10 years agoObjectiveC migrator: For consistency, also infer
Fariborz Jahanian [Wed, 18 Sep 2013 20:35:47 +0000 (20:35 +0000)]
ObjectiveC migrator: For consistency, also infer
'instancetype' for known family of methods
with related result type; such as 'init'
methods. // rdar://14987948

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

10 years ago[analyzer] Don't even try to convert floats to booleans for now.
Jordan Rose [Wed, 18 Sep 2013 18:58:58 +0000 (18:58 +0000)]
[analyzer] Don't even try to convert floats to booleans for now.

We now have symbols with floating-point type to make sure that
(double)x == (double)x comes out true, but we still can't do much with
these. For now, don't even bother trying to create a floating-point zero
value; just give up on conversion to bool.

PR14634, C++ edition.

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

10 years agoObjectiveC migrator: Infer property in the presense
Fariborz Jahanian [Wed, 18 Sep 2013 17:22:25 +0000 (17:22 +0000)]
ObjectiveC migrator: Infer property in the presense
of methods annotated with attributes.
// rdar://14987909

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

10 years agoObjectiveC migrator: placing another check for
Fariborz Jahanian [Wed, 18 Sep 2013 15:43:52 +0000 (15:43 +0000)]
ObjectiveC migrator: placing another check for
'deprecated' container before doing the 'instancetype'
inference.

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

10 years agoSimplify clang-format-diff.py using new clang-format options.
Daniel Jasper [Wed, 18 Sep 2013 12:14:09 +0000 (12:14 +0000)]
Simplify clang-format-diff.py using new clang-format options.

clang-format's -lines parameter makes this significantly easier.

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

10 years ago[ARMv8] Add builtins for CRC instructions.
Joey Gouly [Wed, 18 Sep 2013 10:07:09 +0000 (10:07 +0000)]
[ARMv8] Add builtins for CRC instructions.

Patch by Bradley Smith!

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

10 years agoRecommited:
Stepan Dyatkovskiy [Wed, 18 Sep 2013 09:08:52 +0000 (09:08 +0000)]
Recommited:
Fix for PR16752. Second commit.

PR16752: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width.
2. Fix handleModeAttr according to new methods in TargetInfo.

Fixes:
1st Commit (Done): Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth

2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function.

Also test/Sema/attr-mode.c was fixed. 'XC' mode test was disabled for PPC64 machines.

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

10 years agoAdd support for poly16 vtst and vtstq
Amaury de la Vieuville [Wed, 18 Sep 2013 08:33:53 +0000 (08:33 +0000)]
Add support for poly16 vtst and vtstq

vtst and vtstq currently support poly8 types, but they should also work on
poly16.

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

10 years agoAdd new libm LIBBUILTIN definitions, synchronizing with __builtin_*
Hal Finkel [Wed, 18 Sep 2013 06:19:40 +0000 (06:19 +0000)]
Add new libm LIBBUILTIN definitions, synchronizing with __builtin_*

For all libm __builtin_* functions that are defined, this adds the
corresponding LIBBUILTIN definitions (tagged, as necessary, with "e" instead of
"c" when the function may set errno).

Note that this changes the current definitions for lrint and fma
(unfortunately). The Linux man page documents that these don't set errno, but
the POSIX standard says that they should.

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

10 years agoAdd the intrinsic __builtin_convertvector
Hal Finkel [Wed, 18 Sep 2013 03:29:45 +0000 (03:29 +0000)]
Add the intrinsic __builtin_convertvector

LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

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

10 years agoRemove unnecessary comment regarding AsTypeExpr base class
Hal Finkel [Wed, 18 Sep 2013 03:29:09 +0000 (03:29 +0000)]
Remove unnecessary comment regarding AsTypeExpr base class

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

10 years agoFix accepts-invalid if a variable template explicit instantiation is missing an
Richard Smith [Wed, 18 Sep 2013 02:10:12 +0000 (02:10 +0000)]
Fix accepts-invalid if a variable template explicit instantiation is missing an
argument list, but could be instantiated with argument list of <>.

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

10 years agoFix ObjC @encode for C++ classes w/virtual bases.
Eli Friedman [Wed, 18 Sep 2013 01:59:16 +0000 (01:59 +0000)]
Fix ObjC @encode for C++ classes w/virtual bases.

PR17142.

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

10 years ago-ast-dump support for variable templates.
Richard Smith [Wed, 18 Sep 2013 01:36:02 +0000 (01:36 +0000)]
-ast-dump support for variable templates.

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

10 years agoIf a variable template specialization with an incomplete array type is
Richard Smith [Wed, 18 Sep 2013 01:35:26 +0000 (01:35 +0000)]
If a variable template specialization with an incomplete array type is
referenced, try to instantiate its definition in order to complete the type.

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

10 years agoAdd comment about exporting clang::driver::ArgStringList,
Hans Wennborg [Wed, 18 Sep 2013 00:41:15 +0000 (00:41 +0000)]
Add comment about exporting clang::driver::ArgStringList,
as suggested by Jordan on IRC. Also, use the unqualified name
in Job.cpp.

And while we're here, refer to StringRef with the unqualified
name, because we have a using directive for that too.

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

10 years agoClaim compatibility with VS 2012 by default
Reid Kleckner [Wed, 18 Sep 2013 00:33:59 +0000 (00:33 +0000)]
Claim compatibility with VS 2012 by default

This will define _MSC_VER to 1700 by default and avoid linker errors
from /failifmismatch linker directives in the C++ standard headers.

Most people trying out the Visual Studio integration are using 2012,
since that's the only version that clang-format works with.  This way
they don't have to pass funky -Xclang -fmsc-version=1700 flags just to
link against the standard C++ runtime.

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

10 years agoRevert r190902 and r190906
Hans Wennborg [Wed, 18 Sep 2013 00:21:51 +0000 (00:21 +0000)]
Revert r190902 and r190906

The first one broke the build, and the latter one made it worse.

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

10 years agoRevert "Move using directive from Job.h to Job.cpp" (r190902)
Hans Wennborg [Wed, 18 Sep 2013 00:17:07 +0000 (00:17 +0000)]
Revert "Move using directive from Job.h to Job.cpp" (r190902)

Seems like it was intentional to export ArgStringList as
driver::ArgStringList, and e.g. examples/clang-interpreter/main.cpp
uses it this way.

However, exporting it with a typedef seems like a more common way to do it.

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

10 years agoRevert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately""
David Majnemer [Tue, 17 Sep 2013 23:57:10 +0000 (23:57 +0000)]
Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately""

This reverts commit r190895 which reverted r190892.

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

10 years agoMove using directive from Job.h to Job.cpp
Hans Wennborg [Tue, 17 Sep 2013 23:37:44 +0000 (23:37 +0000)]
Move using directive from Job.h to Job.cpp

I don't think it belongs in the header, but seems handy in the .cpp file.

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

10 years agoObjectiveC migrator. infer NS_OPTIONS correctly in the
Fariborz Jahanian [Tue, 17 Sep 2013 23:32:51 +0000 (23:32 +0000)]
ObjectiveC migrator. infer NS_OPTIONS correctly in the
presense of parenthesized enumerator initializers.

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

10 years agoclang-cl: ignore ths /GS- flag
Hans Wennborg [Tue, 17 Sep 2013 23:27:39 +0000 (23:27 +0000)]
clang-cl: ignore ths /GS- flag

The /GS- flag is used to turn off run-time buffer security checks (/GS).
Since no such checks are enabled in the first place, I think we should just
ignore this flag.

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

10 years agoRevert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"
David Majnemer [Tue, 17 Sep 2013 22:45:28 +0000 (22:45 +0000)]
Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"

This reverts commit r190892.

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

10 years agoObjectiveC migrator: Don't infer property from
Fariborz Jahanian [Tue, 17 Sep 2013 22:41:25 +0000 (22:41 +0000)]
ObjectiveC migrator: Don't infer property from
'deprected' setters either. // rdar://14989365

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

10 years ago[-cxx-abi microsoft] Mangle local TagDecls appropriately
David Majnemer [Tue, 17 Sep 2013 22:21:27 +0000 (22:21 +0000)]
[-cxx-abi microsoft] Mangle local TagDecls appropriately

Summary:
When selecting a mangling for an anonymous tag type:
- We should first try it's typedef'd name.
- If that doesn't work, we should mangle in the name of the declarator
  that specified it as a declaration specifier.
- If that doesn't work, fall back to a static mangling of
  <unnamed-type>.

This should make our anonymous type mangling compatible.

This partially fixes PR16994; we would need to have an implementation of
scope numbering to get it right (a separate issue).

Reviewers: rnk, rsmith, rjmccall, cdavis5x

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1540

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

10 years agoObjectiveC migrator. Ignore migrating 'deprecated'
Fariborz Jahanian [Tue, 17 Sep 2013 21:56:04 +0000 (21:56 +0000)]
ObjectiveC migrator. Ignore migrating 'deprecated'
entities. // rdar://14989365

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

10 years agoObjectiveC migrator: Don't infer a property from isXXX method
Fariborz Jahanian [Tue, 17 Sep 2013 19:38:55 +0000 (19:38 +0000)]
ObjectiveC migrator: Don't infer a property from isXXX method
of retainable object (readonly or otherwise).

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

10 years ago[arcmt] Don't try to handle files that are already ARC'ified, this is not possible...
Argyrios Kyrtzidis [Tue, 17 Sep 2013 19:14:29 +0000 (19:14 +0000)]
[arcmt] Don't try to handle files that are already ARC'ified, this is not possible currently.

rdar://14461559

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

10 years agoObjectiveC migrator. Infer property in categories
Fariborz Jahanian [Tue, 17 Sep 2013 19:00:30 +0000 (19:00 +0000)]
ObjectiveC migrator. Infer property in categories
declared as getter with or without setter method.
// rdar://15010020

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

10 years agoObjectiveC modern translator: Provide proper cast of
Fariborz Jahanian [Tue, 17 Sep 2013 17:51:48 +0000 (17:51 +0000)]
ObjectiveC modern translator: Provide proper cast of
the ObjectiveC object of an @synchronized statement.
// rdar://14993814

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

10 years agoclang-format: Don't accidentally move tokens into preprocessor directive.
Daniel Jasper [Tue, 17 Sep 2013 09:52:48 +0000 (09:52 +0000)]
clang-format: Don't accidentally move tokens into preprocessor directive.

This fixes llvm.org/PR17265.

Before:
  Foo::Foo()
  #ifdef BAR
      : baz(0)
  #endif {
  }

After:
  Foo::Foo()
  #ifdef BAR
      : baz(0)
  #endif
  {
  }

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

10 years agoclang-format: Add comment to tests explaining their grouping.
Daniel Jasper [Tue, 17 Sep 2013 09:26:07 +0000 (09:26 +0000)]
clang-format: Add comment to tests explaining their grouping.

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

10 years agoclang-format: Fix line breaking bug after empty ifs.
Daniel Jasper [Tue, 17 Sep 2013 08:28:05 +0000 (08:28 +0000)]
clang-format: Fix line breaking bug after empty ifs.

Before:
  if () {
  }
    else {
  }

After:
  if () {
  } else {
  }

This fixed llvm.org/PR17262.

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

10 years agoclang-format: Don't split a >>-operator.
Daniel Jasper [Tue, 17 Sep 2013 08:15:46 +0000 (08:15 +0000)]
clang-format: Don't split a >>-operator.

Before (with column limit 60):
  aaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaa >
      > aaaaa);

After:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaa);

(Not sure how that could have stayed in that long without being
detected..)

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

10 years agoPush contents of X86TargetInfo::setFeatureEnabled down to a static function called...
Craig Topper [Tue, 17 Sep 2013 04:51:29 +0000 (04:51 +0000)]
Push contents of X86TargetInfo::setFeatureEnabled down to a static function called by the virtual version and all the places in getDefaultFeatures. This way getDefaultFeatures doesn't make so many virtual calls.

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

10 years agoMark setSSELevel/setMMXLevel/setXOPLevel as static since they don't access anything...
Craig Topper [Tue, 17 Sep 2013 04:12:55 +0000 (04:12 +0000)]
Mark setSSELevel/setMMXLevel/setXOPLevel as static since they don't access anything in the class.

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

10 years agoDon't build extra init lists.
Eli Friedman [Tue, 17 Sep 2013 04:07:04 +0000 (04:07 +0000)]
Don't build extra init lists.

AssignConvertType::IncompatibleVectors means the two types are in fact
compatible. :)

No testcase; I don't think the extra init list has any actual visible effect
other than making the resulting AST dump look a bit strange.

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

10 years agoFix const-eval of vector init-lists of a vector.
Eli Friedman [Tue, 17 Sep 2013 04:07:02 +0000 (04:07 +0000)]
Fix const-eval of vector init-lists of a vector.

Like any other type, an init list for a vector can have the same type as
the vector itself; handle that case.

<rdar://problem/14990460>

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

10 years ago[analyzer] More reliably detect property accessors.
Anna Zaks [Tue, 17 Sep 2013 01:30:57 +0000 (01:30 +0000)]
[analyzer] More reliably detect property accessors.

This has a side effect of preventing a crash, which occurs because we get a
property getter declaration, which is overriding but is declared inside
@protocol. Will file a bug about this inconsistency internally. Getting a
small test case is very challenging.

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

10 years ago[analyzer] Stop tracking the objects with attribute cleanup in the RetainCountChecker.
Anna Zaks [Tue, 17 Sep 2013 00:53:28 +0000 (00:53 +0000)]
[analyzer] Stop tracking the objects with attribute cleanup in the RetainCountChecker.

This suppresses false positive leaks. We stop tracking a value if it is assigned to a variable declared with a cleanup attribute.

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

10 years agoAddress review comment on r189557.
Eli Friedman [Tue, 17 Sep 2013 00:51:31 +0000 (00:51 +0000)]
Address review comment on r189557.

We need to escape filenames the same way in InclusionRewriter whether
UseLineDirective is true or false.

Review comment from http://llvm.org/bugs/show_bug.cgi?id=17018#c2

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

10 years agoFix potential race in module building code.
Eli Friedman [Tue, 17 Sep 2013 00:51:29 +0000 (00:51 +0000)]
Fix potential race in module building code.

Let the module building code handle the case of overwriting an existing file
itself, so the existing locking infrastructure works correctly.

<rdar://problem/14403381>

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

10 years agocl-options.c just use touch to create that .obj file
Hans Wennborg [Tue, 17 Sep 2013 00:50:43 +0000 (00:50 +0000)]
cl-options.c just use touch to create that .obj file

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

10 years agoFix test/Driver/cl-options.c test
Hans Wennborg [Tue, 17 Sep 2013 00:25:08 +0000 (00:25 +0000)]
Fix test/Driver/cl-options.c test

The test builds an object file to be able to get into linking mode
with a valid obj file on the command-line. Using clang-cl for this,
which targets win32, caused problems on some buildbots, so just
use regular clang.

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

10 years agoclang-cl: ignore compile-only options in link-only invocations.
Hans Wennborg [Tue, 17 Sep 2013 00:03:41 +0000 (00:03 +0000)]
clang-cl: ignore compile-only options in link-only invocations.

Previously we would warn about unused arguments such as /MD when linking.
Clang already has logic to ignore compile-only options, e.g. for -D and -U.
This patch extends that to include clang-cl's compile-only options too.

Also, some clang-cl options should always be ignored. Doing this earlier
means they get ignored both for compilation and link-only invocations.

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

10 years agoffreestanding shouldn't effect main() on win32
David Majnemer [Mon, 16 Sep 2013 23:59:35 +0000 (23:59 +0000)]
ffreestanding shouldn't effect main() on win32

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

10 years agoclang-cl: ignore all /w<foo> options
Hans Wennborg [Mon, 16 Sep 2013 23:11:56 +0000 (23:11 +0000)]
clang-cl: ignore all /w<foo> options

We previously ignored /wd<n>, but I think we can ignore the rest too.

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

10 years ago[-cxx-abi microsoft] Correctly identify Win32 entry points
David Majnemer [Mon, 16 Sep 2013 22:44:20 +0000 (22:44 +0000)]
[-cxx-abi microsoft] Correctly identify Win32 entry points

Summary:
This fixes several issues with the original implementation:
- Win32 entry points cannot be in namespaces
- A Win32 entry point cannot be a function template, diagnose if we it.
- Win32 entry points cannot be overloaded.
- Win32 entry points implicitly return, similar to main.

Reviewers: rnk, rsmith, whunt, timurrrr

Reviewed By: rnk

CC: cfe-commits, nrieck
Differential Revision: http://llvm-reviews.chandlerc.com/D1683

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

10 years agoMove the uninitialized field check to after all the field initializers are added
Richard Trieu [Mon, 16 Sep 2013 21:54:53 +0000 (21:54 +0000)]
Move the uninitialized field check to after all the field initializers are added
to the CXXConstructorDecl so that information from the constructor can be used.

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

10 years agoEmit an error when attempting to generate IR for SEH __try
Reid Kleckner [Mon, 16 Sep 2013 21:46:30 +0000 (21:46 +0000)]
Emit an error when attempting to generate IR for SEH __try

Currently we silently omit the code in the try and finally bodies, which
is pretty bad.  This way we fail loudly.

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

10 years agoAdd some missing ProhibitAttributes calls to some declaration-like #pragmas.
Richard Smith [Mon, 16 Sep 2013 21:17:44 +0000 (21:17 +0000)]
Add some missing ProhibitAttributes calls to some declaration-like #pragmas.

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

10 years agoPass additional information around the uninitialized field visitor.
Richard Trieu [Mon, 16 Sep 2013 20:46:50 +0000 (20:46 +0000)]
Pass additional information around the uninitialized field visitor.

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

10 years agoWhen in pre-c++11 mode, treat _T("xxx") as a single string literal, repeat the _T...
Alexander Kornienko [Mon, 16 Sep 2013 20:20:49 +0000 (20:20 +0000)]
When in pre-c++11 mode, treat _T("xxx") as a single string literal, repeat the _T() part around each fragment. This addresses http://llvm.org/PR17122

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek, rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1640

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

10 years agoUpdated the way the ownership attributes are semantically diagnosed. Added test...
Aaron Ballman [Mon, 16 Sep 2013 18:11:41 +0000 (18:11 +0000)]
Updated the way the ownership attributes are semantically diagnosed.  Added test cases for the semantics checks.

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

10 years agoAdd error checking to reject neon_vector_type attribute on targets without NEON.
Amara Emerson [Mon, 16 Sep 2013 18:07:35 +0000 (18:07 +0000)]
Add error checking to reject neon_vector_type attribute on targets without NEON.

Patch by Artyom Skrobov.

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

10 years agoNew message for cases when ownership is taken:
Anton Yartsev [Mon, 16 Sep 2013 17:51:25 +0000 (17:51 +0000)]
New message for cases when ownership is taken:
"+method_name: cannot take ownership of memory allocated by 'new'."
instead of the old
"Memory allocated by 'new' should be deallocated by 'delete', not +method_name"

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

10 years ago[libclang] Don't report a DecayedType as "unexposed", report it as the original ...
Argyrios Kyrtzidis [Mon, 16 Sep 2013 17:26:23 +0000 (17:26 +0000)]
[libclang] Don't report a DecayedType as "unexposed", report it as the original (as written) type.

Patch by Anders Waldenborg!

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

10 years agoAdd a define for the ObjFW runtime ABI version.
Benjamin Kramer [Mon, 16 Sep 2013 16:31:49 +0000 (16:31 +0000)]
Add a define for the ObjFW runtime ABI version.

This removes __has_feature(objc_msg_lookup_stret), as it is not required
anymore after this patch.

Patch by Jonathan Schleifer!

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

10 years ago[analyzer] scan-build: add missing semicolon
Jordan Rose [Mon, 16 Sep 2013 16:17:18 +0000 (16:17 +0000)]
[analyzer] scan-build: add missing semicolon

Patch by Kevin Zheng!

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

10 years agoHandle PredefinedExpr with templates and lambdas
Wei Pan [Mon, 16 Sep 2013 13:57:27 +0000 (13:57 +0000)]
Handle PredefinedExpr with templates and lambdas

Summary:

- lambdas, blocks or captured statements in templates were not
  handled which causes codegen crashes.

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

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

10 years agoMake F16C feature imply AVX. Matches GCC behavior.
Craig Topper [Mon, 16 Sep 2013 04:54:13 +0000 (04:54 +0000)]
Make F16C feature imply AVX. Matches GCC behavior.

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

10 years agoPrune "return" after llvm_unreachable(). It was redundant.
NAKAMURA Takumi [Mon, 16 Sep 2013 01:58:47 +0000 (01:58 +0000)]
Prune "return" after llvm_unreachable(). It was redundant.

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

10 years agoMake __has_extension(c_thread_local) work.
Ed Schouten [Sat, 14 Sep 2013 16:17:20 +0000 (16:17 +0000)]
Make __has_extension(c_thread_local) work.

Unlike C++11's "thread_local" keyword, C11's "_Thread_local" is in the
reserved namespace, meaning we provide it unconditionally; it is marked
as KEYALL in TokenKinds.def.

This means that like all the other C11 keywords, we can expose its
presence through __has_extension().

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

10 years agoAvoid getting an argument of allocation function if it does not exist.
Serge Pavlov [Sat, 14 Sep 2013 12:00:01 +0000 (12:00 +0000)]
Avoid getting an argument of allocation function if it does not exist.
This is a fix to PR12778: in erroneous code an allocation function
can be declared with no arguments, quering the first argument in this case
causes assertion violation.

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