]> granicus.if.org Git - clang/log
clang
10 years agoclang-format: Don't exit with failure on empty files.
Daniel Jasper [Tue, 8 Oct 2013 15:54:36 +0000 (15:54 +0000)]
clang-format: Don't exit with failure on empty files.

Also let clang-format-diff.py detect errors based on clang-format's
return code. Otherwise messages like "Can't find usable .clang-format,
falling back to LLVM style" can make it fail, which might be undesired.

Patch by Alp Toker. Thank you!

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

10 years agoMake InstantiatingTemplate depth checks clearer
Alp Toker [Tue, 8 Oct 2013 08:09:04 +0000 (08:09 +0000)]
Make InstantiatingTemplate depth checks clearer

The bool conversion operator on InstantiatingTemplate never added value and
only served to obfuscate the template instantiation routines.

This replaces the conversion and its callers with an explicit isInvalid()
function to make it clear what's going on at a glance.

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

10 years agoclang-format: Improve constructor initializer linewrapping.
Daniel Jasper [Tue, 8 Oct 2013 05:11:18 +0000 (05:11 +0000)]
clang-format: Improve constructor initializer linewrapping.

Specifically make ConstructorInitializerAllOnOneLineOrOnePerLine work
nicely with BreakConstructorInitializersBeforeComma.

This fixes llvm.org/PR17395.

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

10 years agoFix linkage calculation of auto member functions returning lambdas
Faisal Vali [Tue, 8 Oct 2013 04:15:04 +0000 (04:15 +0000)]
Fix linkage calculation of auto member functions returning lambdas

As described by Richard in https://groups.google.com/a/isocpp.org/d/msg/std-discussion/S1kmj0wF5-g/fb6agEYoL2IJ

we should allow:

template<typename S>
struct A {

template<typename T> static auto default_lambda() {
  return [](const T&) { return 42; };
}

template<class U = decltype(default_lambda<S>())>
  U func(U u = default_lambda<S>()) { return u; }

};

int run2 = A<double>{}.func()(3.14);

int run3 = A<char>{}.func()('a');

This patch allows the code using the same trickery that was used to allow the code in non-member functions at namespace scope.

Please see http://llvm-reviews.chandlerc.com/D1844 for richard's approval.

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

10 years ago[ms-cxxabi] Fix the calling convention for operator new in records
Reid Kleckner [Tue, 8 Oct 2013 00:58:57 +0000 (00:58 +0000)]
[ms-cxxabi] Fix the calling convention for operator new in records

Summary:
Operator new, new[], delete, and delete[] are all implicitly static when
declared inside a record.  CXXMethodDecl already knows this, but we need
to account for that before we pick the calling convention for the
function type.

Fixes PR17371.

Reviewers: rsmith

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

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

10 years agoSema: Only merge typedef attributes if the previous decl is a typedef
Justin Bogner [Tue, 8 Oct 2013 00:19:09 +0000 (00:19 +0000)]
Sema: Only merge typedef attributes if the previous decl is a typedef

In r186373, we started merging attributes on typedefs, but this causes
us to try to merge attributes even if the previous declaration was not
a typedef.

Only merge the attributes if the previous decl was also a typedef.

Fixes rdar://problem/15044218

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

10 years agoTBAA: use the same format for scalar TBAA and struct-path aware TBAA.
Manman Ren [Tue, 8 Oct 2013 00:08:49 +0000 (00:08 +0000)]
TBAA: use the same format for scalar TBAA and struct-path aware TBAA.

An updated version of r191586 with bug fix.

Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.

We should not generate a TBAA tag with null being the first field. When
a TBAA type node is null, the tag should be null too. Make sure we
don't decorate an instruction with a null TBAA tag.

Added a testing case for the bug reported by Richard with -relaxed-aliasing
and -fsanitizer=thread.

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

10 years agoSplit test to test -Wshadow with emmintrin.h more portable.
Ted Kremenek [Tue, 8 Oct 2013 00:03:41 +0000 (00:03 +0000)]
Split test to test -Wshadow with emmintrin.h more portable.

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

10 years agoSuppress useless -Wshadow warning when using _mm* macros from emmintrin.h
Ted Kremenek [Mon, 7 Oct 2013 23:51:11 +0000 (23:51 +0000)]
Suppress useless -Wshadow warning when using _mm* macros from emmintrin.h

Fixes <rdar://problem/10679282>.

I'm not completely satisfied with this patch.  Sprinkling "diagnostic ignored"
_Pragmas throughout this file is gross, but I couldn't suppress
it for the entire file.

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

10 years agoclang-cl: Accept and mostly ignore /vm*, /GF, /GF-, /Zm, and /bigobj
Reid Kleckner [Mon, 7 Oct 2013 23:19:01 +0000 (23:19 +0000)]
clang-cl: Accept and mostly ignore /vm*, /GF, /GF-, /Zm, and /bigobj

Patch by David Ziman!

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

10 years agoAdd a triple to unbreak buildbots where size_t is not 'unsigned long'.
Richard Smith [Mon, 7 Oct 2013 22:58:25 +0000 (22:58 +0000)]
Add a triple to unbreak buildbots where size_t is not 'unsigned long'.

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

10 years agoRemove -ast-dump-xml.
Richard Smith [Mon, 7 Oct 2013 20:56:34 +0000 (20:56 +0000)]
Remove -ast-dump-xml.

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

10 years agoObjectiveC migrator: A typical implementation of
Fariborz Jahanian [Mon, 7 Oct 2013 20:41:53 +0000 (20:41 +0000)]
ObjectiveC migrator: A typical implementation of
'default' methods in Foundation does not
infer 'instancetype' for methods' result type.
// rdar://15145218

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

10 years agoAdd support for WG21 N3599 (literal operator template for strings) as a GNU
Richard Smith [Mon, 7 Oct 2013 19:57:58 +0000 (19:57 +0000)]
Add support for WG21 N3599 (literal operator template for strings) as a GNU
extension. The GCC folks have decided to support this even though the standard
committee have not yet approved this feature.

Patch by Hristo Venev!

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

10 years agoObjectiveC modern rewriter. Rewrite typedefs
Fariborz Jahanian [Mon, 7 Oct 2013 19:54:22 +0000 (19:54 +0000)]
ObjectiveC modern rewriter. Rewrite typedefs
declared locally in ObjectiveC containers.
// rdar://15143875

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

10 years agoFix objectsize tests after r192117
Matt Arsenault [Mon, 7 Oct 2013 19:00:18 +0000 (19:00 +0000)]
Fix objectsize tests after r192117

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

10 years agoObjectiveC: Warn when 'readonly' property has explicit
Fariborz Jahanian [Mon, 7 Oct 2013 17:20:02 +0000 (17:20 +0000)]
ObjectiveC: Warn when 'readonly' property has explicit
ownership attribute (such as 'copy', 'assign' etc.)
// rdar://15131088

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

10 years ago[analyzer] ArrayRef-ize BugReporter::EmitBasicReport.
Jordan Rose [Mon, 7 Oct 2013 17:16:59 +0000 (17:16 +0000)]
[analyzer] ArrayRef-ize BugReporter::EmitBasicReport.

No functionality change.

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

10 years ago[analyzer] RetainCountChecker: add support for CFAutorelease.
Jordan Rose [Mon, 7 Oct 2013 17:16:52 +0000 (17:16 +0000)]
[analyzer] RetainCountChecker: add support for CFAutorelease.

<rdar://problems/13710586&13710643>

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

10 years ago[AArch64] Add support for NEON scalar arithmetic instructions:
Chad Rosier [Mon, 7 Oct 2013 17:07:17 +0000 (17:07 +0000)]
[AArch64] Add support for NEON scalar arithmetic instructions:
SQDMULH, SQRDMULH, FMULX, FRECPS, and FRSQRTS.

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

10 years ago[libclang] Add some tests by Loïc Jaquemet that I forgot to add earlier.
Argyrios Kyrtzidis [Mon, 7 Oct 2013 16:38:40 +0000 (16:38 +0000)]
[libclang] Add some tests by Loïc Jaquemet that I forgot to add earlier.

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

10 years agoSema::tryCaptureVariable(): Prune three unused variables, HasBlocksAttr, IsBlock...
NAKAMURA Takumi [Mon, 7 Oct 2013 09:32:50 +0000 (09:32 +0000)]
Sema::tryCaptureVariable(): Prune three unused variables, HasBlocksAttr, IsBlock, and IsLambda. [-Wunused-variable]

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

10 years agoFix incorrect detection of class definitions with alignas specification.
Manuel Klimek [Mon, 7 Oct 2013 09:15:41 +0000 (09:15 +0000)]
Fix incorrect detection of class definitions with alignas specification.

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

10 years agoWhen merging class definitions across modules in C++, merge together fields.
Richard Smith [Mon, 7 Oct 2013 08:02:11 +0000 (08:02 +0000)]
When merging class definitions across modules in C++, merge together fields.
This change doesn't go all the way to making fields redeclarable; instead, it
makes them 'mergeable', which means we can find the canonical declaration, but
not much else (and for a declaration that's not from a module, the canonical
declaration is always that declaration).

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

10 years agoDriver: Use the canonical command line arguments.
David Majnemer [Mon, 7 Oct 2013 07:33:27 +0000 (07:33 +0000)]
Driver: Use the canonical command line arguments.

Summary:
Use the arguments given to the OS at process creation-time instead of
the arguments passed into main() by the C runtime environment.  The ones
that main() received may not be suitable (e.g. not Unicode).

Depends on D1834

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

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

10 years agoRefactor tryCaptureVar using ExtractMethod. No functionality change.
Faisal Vali [Mon, 7 Oct 2013 05:13:48 +0000 (05:13 +0000)]
Refactor tryCaptureVar using ExtractMethod.  No functionality change.

In chicago, Doug had requested that I go ahead and commit the refactor  as a separate change, if all the tests passed.

Lets hope the buildbots stay quiet.

Thanks!

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

10 years agoFix PR17382 - properly group virtual method overloads in the vftable
Timur Iskhodzhanov [Sun, 6 Oct 2013 15:31:37 +0000 (15:31 +0000)]
Fix PR17382 - properly group virtual method overloads in the vftable

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

10 years agoclang-format: Remove empty lines after visibility modifiers.
Daniel Jasper [Sun, 6 Oct 2013 11:40:08 +0000 (11:40 +0000)]
clang-format: Remove empty lines after visibility modifiers.

Formatting:
  class C {
  public:

    f();
  };

Now leads to:
  class C {
  public:
    f();
  };

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

10 years agoremove a dead assignment. The variables are set just right after. Found by scan-build...
Sylvestre Ledru [Sun, 6 Oct 2013 09:54:18 +0000 (09:54 +0000)]
remove a dead assignment. The variables are set just right after. Found by scan-build http://buildd-clang.debian.net/scan-build/

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

10 years agoPass CGCXXABIs around directly.
Mark Lacey [Sun, 6 Oct 2013 01:33:34 +0000 (01:33 +0000)]
Pass CGCXXABIs around directly.

In functions that only need to use the CGCXXABI member of a CodeGenTypes
class, pass that reference around directly rather than a reference to
a CodeGenTypes class.

This makes the actual dependence on CGCXXABI clear at the call sites.

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

10 years agoSwitching the CallableWhen attribute over to using the string literal helper function...
Aaron Ballman [Sat, 5 Oct 2013 22:45:34 +0000 (22:45 +0000)]
Switching the CallableWhen attribute over to using the string literal helper function instead of custom logic.

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

10 years agoAdd support for -mcx16, and predefine __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 when
Nick Lewycky [Sat, 5 Oct 2013 20:14:27 +0000 (20:14 +0000)]
Add support for -mcx16, and predefine __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 when
it is enabled. Also enable it on the same architectures that GCC does.

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

10 years agoSilencing an MSVC warning; SmallSet::count returns a bool instead of a size_t.
Aaron Ballman [Sat, 5 Oct 2013 19:56:07 +0000 (19:56 +0000)]
Silencing an MSVC warning; SmallSet::count returns a bool instead of a size_t.

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

10 years agoUse logical/arithmetic operations instead of builtins in tbmintrin.h. This way we...
Craig Topper [Sat, 5 Oct 2013 17:08:42 +0000 (17:08 +0000)]
Use logical/arithmetic operations instead of builtins in tbmintrin.h. This way we can remove the intrinsic support from the backend.

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

10 years agoRemove unused param from Linux::computeSysRoot().
Simon Atanasyan [Sat, 5 Oct 2013 14:37:55 +0000 (14:37 +0000)]
Remove unused param from Linux::computeSysRoot().

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

10 years agoSema: Cleanup redundant variable NumArgsToCheck
Benjamin Kramer [Sat, 5 Oct 2013 10:03:01 +0000 (10:03 +0000)]
Sema: Cleanup redundant variable NumArgsToCheck

Patch by Daniel Marjamäki!

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

10 years agoImplement aarch64 neon instruction set AdvSIMD (Across).
Jiangning Liu [Sat, 5 Oct 2013 08:22:55 +0000 (08:22 +0000)]
Implement aarch64 neon instruction set AdvSIMD (Across).

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

10 years agoRemove unused Sema::DelayedDestructorExceptionSpecs
Alp Toker [Sat, 5 Oct 2013 06:50:51 +0000 (06:50 +0000)]
Remove unused Sema::DelayedDestructorExceptionSpecs

This was a leftover from r160847.

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

10 years agoDebug Info: update testing cases when the derived-from field of a
Manman Ren [Sat, 5 Oct 2013 01:43:22 +0000 (01:43 +0000)]
Debug Info: update testing cases when the derived-from field of a
DW_TAG_pointer_type is updated to use DITypeRef.

Paired commit with r192018.

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

10 years agoConsumed Analysis: Change callable_when so that it can take a list of states
DeLesley Hutchins [Fri, 4 Oct 2013 21:28:06 +0000 (21:28 +0000)]
Consumed Analysis:  Change callable_when so that it can take a list of states
that a function can be called in.  This reduced the total number of annotations
needed and makes writing more complicated behaviour less burdensome.
Patch by chriswails@gmail.com.

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

10 years agoObjectiveC. Allow readonly properties without an explicit ownership
Fariborz Jahanian [Fri, 4 Oct 2013 18:06:08 +0000 (18:06 +0000)]
ObjectiveC. Allow readonly properties without an explicit ownership
(assign/unsafe_unretained/weak/retain/strong/copy) in super class
to be overridden by a property with any explicit ownership in the
subclass. // rdar://15014468

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

10 years agoTemporarily revert r191801 due to conflicts with the revert of r191792.
Eric Christopher [Fri, 4 Oct 2013 17:08:47 +0000 (17:08 +0000)]
Temporarily revert r191801 due to conflicts with the revert of r191792.

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

10 years agoDon't assume instruction names in the output.
Rafael Espindola [Fri, 4 Oct 2013 14:42:00 +0000 (14:42 +0000)]
Don't assume instruction names in the output.

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

10 years agoAdd test from pr17476.
Rafael Espindola [Fri, 4 Oct 2013 14:33:42 +0000 (14:33 +0000)]
Add test from pr17476.

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

10 years agoRevert "Teach TreeTransform and family how to transform generic lambdas within templa...
Rafael Espindola [Fri, 4 Oct 2013 14:28:51 +0000 (14:28 +0000)]
Revert "Teach TreeTransform and family how to transform generic lambdas within templates and nested within themselves."

This reverts commit r191879. It caused llvm.org/pr17476.

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

10 years agoDo not emit undefined lsrh/ashr for NEON shifts
Amaury de la Vieuville [Fri, 4 Oct 2013 13:13:15 +0000 (13:13 +0000)]
Do not emit undefined lsrh/ashr for NEON shifts

These IR instructions are undefined when the amount is equal to operand
size, but NEON right shifts support such shifts. Work around that by
emitting a different IR in these cases.

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

10 years agoRevert r191947. The problem is not MIPS-specific and requires more
Simon Atanasyan [Fri, 4 Oct 2013 11:46:54 +0000 (11:46 +0000)]
Revert r191947. The problem is not MIPS-specific and requires more
general solution.

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

10 years agoSimplify MicrosoftCXXNameMangler::mangleFunctionType
Timur Iskhodzhanov [Fri, 4 Oct 2013 11:25:05 +0000 (11:25 +0000)]
Simplify MicrosoftCXXNameMangler::mangleFunctionType

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

10 years ago[Mips] For MIPS '-fPIC -static' means to compile as -fPIC but link with
Simon Atanasyan [Fri, 4 Oct 2013 10:36:42 +0000 (10:36 +0000)]
[Mips] For MIPS '-fPIC -static' means to compile as -fPIC but link with
-static. So do not turn off the PIC flag if -static passed to the
driver in case of MIPS target.

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

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

10 years agoImplement aarch64 neon instruction set AdvSIMD (3V elem).
Jiangning Liu [Fri, 4 Oct 2013 09:21:17 +0000 (09:21 +0000)]
Implement aarch64 neon instruction set AdvSIMD (3V elem).

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

10 years ago[analyzer] Replace bug category magic strings with shared constants, take 2.
Jordan Rose [Fri, 4 Oct 2013 00:25:24 +0000 (00:25 +0000)]
[analyzer] Replace bug category magic strings with shared constants, take 2.

Re-commit r191910 (reverted in r191936) with layering violation fixed, by
moving the bug categories to StaticAnalyzerCore instead of ...Checkers.

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

10 years agoTemporarily revert r191910 until the layering violation can be fixed.
Richard Smith [Thu, 3 Oct 2013 23:38:02 +0000 (23:38 +0000)]
Temporarily revert r191910 until the layering violation can be fixed.

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

10 years agoDon't complain about -fuse-ld=gold (cf r191429).
Nico Weber [Thu, 3 Oct 2013 19:45:55 +0000 (19:45 +0000)]
Don't complain about -fuse-ld=gold (cf r191429).

(There's a real implementation for this flag in review.)

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

10 years agoFix the test in clang_f_opts.c to fail on unknown options.
Rafael Espindola [Thu, 3 Oct 2013 19:34:34 +0000 (19:34 +0000)]
Fix the test in clang_f_opts.c to fail on unknown options.

Also fix options that were broken in the previous refactorings.

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

10 years agoFix test.
Rafael Espindola [Thu, 3 Oct 2013 19:18:22 +0000 (19:18 +0000)]
Fix test.

With -### clang return 0, so we have to use FileCheck to see if there was an
error.

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

10 years agoMake this use -### instead of a temporary output.
Eric Christopher [Thu, 3 Oct 2013 18:23:29 +0000 (18:23 +0000)]
Make this use -### instead of a temporary output.

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

10 years agoGive this a temporary output so it is cleaned up.
Eric Christopher [Thu, 3 Oct 2013 18:02:14 +0000 (18:02 +0000)]
Give this a temporary output so it is cleaned up.

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

10 years agoIgnore -mieee-fp.
Rafael Espindola [Thu, 3 Oct 2013 17:06:43 +0000 (17:06 +0000)]
Ignore -mieee-fp.

It looks like clang always produce code with the ieee comparisons, so it is
safe to ignore this flag (we still error on -mno-ieee-fp).

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

10 years ago[analyzer] Replace bug category magic strings with shared constants.
Jordan Rose [Thu, 3 Oct 2013 16:57:20 +0000 (16:57 +0000)]
[analyzer] Replace bug category magic strings with shared constants.

One small functionality change is to bring the sizeof-pointer checker in
line with the other checkers by making its category be "Logic error"
instead of just "Logic". There should be no other functionality changes.

Patch by Daniel Marjamäki!

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

10 years ago[analyzer] Add new debug helper clang_analyzer_warnIfReached.
Jordan Rose [Thu, 3 Oct 2013 16:57:03 +0000 (16:57 +0000)]
[analyzer] Add new debug helper clang_analyzer_warnIfReached.

This will emit a warning if a call to clang_analyzer_warnIfReached is
executed, printing REACHABLE. This is a more explicit way to declare
expected reachability than using clang_analyzer_eval or triggering
a bug (divide-by-zero or null dereference), and unlike the former will
work the same in inlined functions and top-level functions. Like the
other debug helpers, it is part of the debug.ExprInspection checker.

Patch by Jared Grubb!

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

10 years ago[libclang] python: expose a few functions, patch by Loïc Jaquemet!
Argyrios Kyrtzidis [Thu, 3 Oct 2013 16:19:27 +0000 (16:19 +0000)]
[libclang] python: expose a few functions, patch by Loïc Jaquemet!

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

10 years ago[libclang] Introduce clang_Type_getClassType which returns the class type of a member...
Argyrios Kyrtzidis [Thu, 3 Oct 2013 16:19:23 +0000 (16:19 +0000)]
[libclang] Introduce clang_Type_getClassType which returns the class type of a member pointer type.

Patch by Che-Liang Chiou!

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

10 years agoFix test to work on Linux hosts by specifying triple.
Tim Northover [Thu, 3 Oct 2013 14:29:54 +0000 (14:29 +0000)]
Fix test to work on Linux hosts by specifying triple.

Thought I'd checked that before

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

10 years agoARM: *-*-darwin-eabi triples should use AAPCS.
Tim Northover [Thu, 3 Oct 2013 14:23:28 +0000 (14:23 +0000)]
ARM: *-*-darwin-eabi triples should use AAPCS.

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

10 years agoGracefully (and correctly) handle init of multiple union members
Matthew Curtis [Thu, 3 Oct 2013 12:14:24 +0000 (12:14 +0000)]
Gracefully (and correctly) handle init of multiple union members

We now emit warnings when doing so and code generation is consistent
with GCC. Note that the C99 spec is unclear as to the precise
behavior.

See also ...
Bug:
  http://llvm.org/bugs/show_bug.cgi?id=16644 and

cfe-dev discussion:
  http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031918.html

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

10 years agoTeach TreeTransform and family how to transform generic lambdas within templates...
Faisal Vali [Thu, 3 Oct 2013 06:29:33 +0000 (06:29 +0000)]
Teach TreeTransform and family how to transform generic lambdas within templates and nested within themselves.

This does not yet include capturing (that is next).

Please see test file for examples.

This patch was LGTM'd by Doug:
http://llvm-reviews.chandlerc.com/D1784
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090048.html

When I first committed this patch - a bunch of buildbots were unable to compile the code that VS2010 seemed to compile.  Seems like there was a dependency on Sema/Template.h which VS did not seem to need, but I have now added for the other compilers.  It still compiles on Visual Studio 2010 - lets hope the buildbots remain quiet (please!)

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

10 years agoExtract ABI-specific parts of MangleContext into separate classes
Timur Iskhodzhanov [Thu, 3 Oct 2013 06:26:13 +0000 (06:26 +0000)]
Extract ABI-specific parts of MangleContext into separate classes

Reviewed at http://llvm-reviews.chandlerc.com/D1807

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

10 years agoRevert changes from the nested lambdas commit till i figure out
Faisal Vali [Thu, 3 Oct 2013 05:58:37 +0000 (05:58 +0000)]
Revert changes from the nested lambdas commit till i figure out
why the buildbots are failing.

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

10 years agoTeach TreeTransform and family how to transform generic lambdas within templates...
Faisal Vali [Thu, 3 Oct 2013 05:32:48 +0000 (05:32 +0000)]
Teach TreeTransform and family how to transform generic lambdas within templates and nested within themselves.

This does not yet include capturing (that is next).

Please see test file for examples.

This patch was LGTM'd by Doug:
http://llvm-reviews.chandlerc.com/D1784

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

10 years agoChange __builtin_ia32_bextri_u64 to take an i64imm to match up with LLVM backend...
Craig Topper [Thu, 3 Oct 2013 04:21:19 +0000 (04:21 +0000)]
Change __builtin_ia32_bextri_u64 to take an i64imm to match up with LLVM backend changes.

An explicit cast is still needed in tbmintrin.h to convert any big integer down to i32imm.

Patch from Yunzhong Gao.

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

10 years agoObjectiveC migrator: Add individual options and
Fariborz Jahanian [Wed, 2 Oct 2013 22:49:59 +0000 (22:49 +0000)]
ObjectiveC migrator: Add individual options and
enable them for distinct feature migration.
// rdar://15003157

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

10 years agoObjectiveC migrator: Add more options one for each
Fariborz Jahanian [Wed, 2 Oct 2013 21:58:13 +0000 (21:58 +0000)]
ObjectiveC migrator: Add more options one for each
kind of migration. // rdar://15003157

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

10 years agoObjectiveC migrator. Starting distiguising different
Fariborz Jahanian [Wed, 2 Oct 2013 21:32:39 +0000 (21:32 +0000)]
ObjectiveC migrator. Starting distiguising different
migrations under their own option.
wip and // rdar://15003157

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

10 years agoUse the CGCXXABI member on CodeGenTypes.
Mark Lacey [Wed, 2 Oct 2013 20:35:23 +0000 (20:35 +0000)]
Use the CGCXXABI member on CodeGenTypes.

CodeGenTypes already has a reference to a CGCXXABI. Use this directly
rather than going through CodeGenModule to get to the same information.

This is consistent with other references to CGCXXABI in CodeGenTypes
functions defined in CGCall.cpp.

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

10 years agoSpeed up CorrectTypo by avoiding lookups on unreasonable candidates.
Kaelyn Uhrain [Wed, 2 Oct 2013 18:26:35 +0000 (18:26 +0000)]
Speed up CorrectTypo by avoiding lookups on unreasonable candidates.

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

10 years agoObjective-C migrator. Simplify migrator option
Fariborz Jahanian [Wed, 2 Oct 2013 17:08:12 +0000 (17:08 +0000)]
Objective-C migrator. Simplify migrator option
processing in preparation for adding several more
options. // rdar://15003157

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

10 years agoFix crashes when creating global instances of polymorphic classes without fields
Timur Iskhodzhanov [Wed, 2 Oct 2013 16:03:16 +0000 (16:03 +0000)]
Fix crashes when creating global instances of polymorphic classes without fields

Reviewed at http://llvm-reviews.chandlerc.com/D1795

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

10 years agoAccept #pragma warning(push, 0) without warning
Reid Kleckner [Wed, 2 Oct 2013 15:19:23 +0000 (15:19 +0000)]
Accept #pragma warning(push, 0) without warning

This partially addresses PR17435, but it doesn't actually implement the
pragma.  If we implement it, we should map levels 1-4 to something like
-Wall and level 0 to something like -w.

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

10 years agoclang-format: Fix clang-format-diff.py according to diff specification.
Daniel Jasper [Wed, 2 Oct 2013 13:59:03 +0000 (13:59 +0000)]
clang-format: Fix clang-format-diff.py according to diff specification.

Patch by Alp Toker. Many thanks!

Original descriptions:
clang-format-diff incorrectly modifies unchanged lines due to an error
in diff parsing.

The unified diff format has a default line change count of 1, and 0 may
be specified to indicate that no lines have been added. This patch
updates the parser to accurately reflect the diff specification.

This also has the benefit of stabilising the operation so it will
produce the same output when run multiple times on the same changeset,
which was previously not the case.

No tests added because this script is not currently tested (though we
should look into that!)

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

10 years agoFix gcc -Wunused-but-set-variable warning in r191634.
Patrik Hagglund [Wed, 2 Oct 2013 10:59:08 +0000 (10:59 +0000)]
Fix gcc -Wunused-but-set-variable warning in r191634.

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

10 years ago[ARM] Add a builtin to allow you to use the 'sevl' instruction.
Joey Gouly [Wed, 2 Oct 2013 10:00:18 +0000 (10:00 +0000)]
[ARM] Add a builtin to allow you to use the 'sevl' instruction.

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

10 years agoFix build breakage, missed committing a chunk of a patch.
Nick Lewycky [Wed, 2 Oct 2013 02:33:11 +0000 (02:33 +0000)]
Fix build breakage, missed committing a chunk of a patch.

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

10 years agoThread a SourceLocation into the EmitCheck for "load_invalid_value". This occurs
Nick Lewycky [Wed, 2 Oct 2013 02:29:49 +0000 (02:29 +0000)]
Thread a SourceLocation into the EmitCheck for "load_invalid_value". This occurs
when scalars are loaded / undergo lvalue-to-rvalue conversion.

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

10 years ago[analyzer] Add missing return after function pointer null check.
Jordan Rose [Wed, 2 Oct 2013 01:20:28 +0000 (01:20 +0000)]
[analyzer] Add missing return after function pointer null check.

Also add some tests that there is actually a message and that the bug is
actually a hard error. This actually behaved correctly before, because:

- addTransition() doesn't actually add a transition if the new state is null;
  it assumes you want to propagate the predecessor forward and does nothing.
- generateSink() is called in order to emit a bug report.
- If at least one new node has been generated, the predecessor node is /not/
  propagated forward.

But now it's spelled out explicitly.

Found by Richard Mazorodze, who's working on a patch that may require this.

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

10 years agoDebug Info: update testing cases when the derived-from field of a
Manman Ren [Tue, 1 Oct 2013 23:46:19 +0000 (23:46 +0000)]
Debug Info: update testing cases when the derived-from field of a
DW_TAG_pointer_type is updated to use DITypeRef.

Paired commit with r191800.

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

10 years agoFix a typo suggestion regression introduced by r191544.
Kaelyn Uhrain [Tue, 1 Oct 2013 22:00:28 +0000 (22:00 +0000)]
Fix a typo suggestion regression introduced by r191544.

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

10 years agoNo functionality change. Reflow lines that could fit on one line. Break lines
Nick Lewycky [Tue, 1 Oct 2013 21:51:38 +0000 (21:51 +0000)]
No functionality change. Reflow lines that could fit on one line. Break lines
that had 80-column violations. Remove spurious emacs mode markers on .cpp files.

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

10 years agoObjectiveC migrator: When doing migration, migrator must suggest
Fariborz Jahanian [Tue, 1 Oct 2013 21:16:29 +0000 (21:16 +0000)]
ObjectiveC migrator: When doing migration, migrator must suggest
migration of headers which have become system headers by user having put
the .system_framework in the sdk directory.
// rdar://15066802

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

10 years agoRevert commits r190613, r190560 and r190557.
Rafael Espindola [Tue, 1 Oct 2013 17:31:40 +0000 (17:31 +0000)]
Revert commits r190613, r190560 and r190557.

The added a cmake invocation to null builds, making them a lot slower.

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

10 years agoFixing implementation of bittestandset in Intrin.h.
Warren Hunt [Tue, 1 Oct 2013 17:12:40 +0000 (17:12 +0000)]
Fixing implementation of bittestandset in Intrin.h.

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

10 years agoFixed replacements for files with relative paths are not applied.
Ariel J. Bernal [Tue, 1 Oct 2013 14:59:00 +0000 (14:59 +0000)]
Fixed replacements for files with relative paths are not applied.

Replacements were no applied when using a compilation database with paths in the
compilation command relative to the compile directory. This patch makes those
paths abosulte.

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

10 years agoRefactoring: split addTokenToState into two methods.
Alexander Kornienko [Tue, 1 Oct 2013 14:41:18 +0000 (14:41 +0000)]
Refactoring: split addTokenToState into two methods.

Summary: Pure refactoring, should be no semantic changes.

Reviewers: djasper

Reviewed By: djasper

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

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

10 years agoTypo in ARM __attribute__((interrupt)) documentation
Tim Northover [Tue, 1 Oct 2013 14:39:43 +0000 (14:39 +0000)]
Typo in ARM __attribute__((interrupt)) documentation

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

10 years agoImplement ARM GNU-style interrupt attribute
Tim Northover [Tue, 1 Oct 2013 14:34:25 +0000 (14:34 +0000)]
Implement ARM GNU-style interrupt attribute

This attribute allows users to use a modified C or C++ function as an ARM
exception-handling function and, with care, to successfully return control to
user-space after the issue has been dealt with.

rdar://problem/14207019

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

10 years agoMove checkStringLiteralArgument into Sema class
Tim Northover [Tue, 1 Oct 2013 14:34:18 +0000 (14:34 +0000)]
Move checkStringLiteralArgument into Sema class

It's a useful function to have around for target-specific attributes.

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

10 years agoRun the -cxx-abi test in 32-bit mode as the 64-bit one crashes on the bots
Timur Iskhodzhanov [Tue, 1 Oct 2013 14:10:03 +0000 (14:10 +0000)]
Run the -cxx-abi test in 32-bit mode as the 64-bit one crashes on the bots

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

10 years agoAuthor a FIXME in a test now that PR12784 is fixed
Timur Iskhodzhanov [Tue, 1 Oct 2013 13:56:35 +0000 (13:56 +0000)]
Author a FIXME in a test now that PR12784 is fixed

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

10 years ago[ARM] Add -mfpu=none option to the driver.
Amara Emerson [Tue, 1 Oct 2013 10:20:54 +0000 (10:20 +0000)]
[ARM] Add -mfpu=none option to the driver.

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

10 years ago[OpenMP] Added parsing and semantic analysis for firstprivate clause
Alexey Bataev [Tue, 1 Oct 2013 05:32:34 +0000 (05:32 +0000)]
[OpenMP] Added parsing and semantic analysis for firstprivate clause

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

10 years agoFix computation of linkage within nested lambdas.
Faisal Vali [Tue, 1 Oct 2013 02:51:53 +0000 (02:51 +0000)]
Fix computation of linkage within nested lambdas.

When nested C++11 lambdas are used in NSDMI's - this patch prevents infinite recursion by computing the linkage of any nested lambda by determining the linkage of the outermost enclosing lambda (which might inherit its linkage from its parent).

See http://llvm-reviews.chandlerc.com/D1783 for Doug's approval.

[On a related note, I need this patch so as to pass tests of transformations of nested lambdas returned from member functions]

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