]> granicus.if.org Git - clang/log
clang
11 years agoDefine __SIZE_MAX__ preprocessor macro.
Evgeniy Stepanov [Thu, 28 Mar 2013 08:36:54 +0000 (08:36 +0000)]
Define __SIZE_MAX__ preprocessor macro.

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

11 years agoFor -Wignored-qualifiers, don't warn on qualifiers which we acquire via a
Richard Smith [Thu, 28 Mar 2013 03:27:52 +0000 (03:27 +0000)]
For -Wignored-qualifiers, don't warn on qualifiers which we acquire via a
typedef. Also don't warn on the _Atomic type specifier, just on the _Atomic
type qualifier.

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

11 years agoTeach -Wigored-qualifiers about exotic flavors of declarator and the _Atomic type...
Richard Smith [Thu, 28 Mar 2013 02:51:21 +0000 (02:51 +0000)]
Teach -Wigored-qualifiers about exotic flavors of declarator and the _Atomic type qualifier.

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

11 years agoRevert "Update debug info test for schema change made to LLVM."
David Blaikie [Thu, 28 Mar 2013 02:44:15 +0000 (02:44 +0000)]
Revert "Update debug info test for schema change made to LLVM."

This reverts commit 5035c483b7fcbf0fa2a7afba24fa35a10995d195.

This schema change wasn't necessary after all. I'm going ith a different
solution that will hopefully use space more conservatively.

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

11 years agoRemove outdated FIXME.
Richard Smith [Thu, 28 Mar 2013 01:56:34 +0000 (01:56 +0000)]
Remove outdated FIXME.

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

11 years agoSupport C11 _Atomic type qualifier. This is more-or-less just syntactic sugar for...
Richard Smith [Thu, 28 Mar 2013 01:55:44 +0000 (01:55 +0000)]
Support C11 _Atomic type qualifier. This is more-or-less just syntactic sugar for the _Atomic type specifier.

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

11 years agoFold together the two implementations of 6.7.3p2 in SemaType. Fix two bugs, each...
Richard Smith [Thu, 28 Mar 2013 00:03:10 +0000 (00:03 +0000)]
Fold together the two implementations of 6.7.3p2 in SemaType. Fix two bugs, each of which was only present in one version:
 * Give the right diagnostic for 'restrict' applied to a non-pointer, non-reference type.
 * Don't reject 'restrict' applied indirectly to an Objective-C object pointer type (eg, through template instantiation).

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

11 years ago[Parser] Don't code-complete twice.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 23:58:17 +0000 (23:58 +0000)]
[Parser] Don't code-complete twice.

When we are consuming the current token just to enter a new token stream, we push
the current token in the back of the stream so that we get it again.

Unfortunately this had the effect where if the current token is a code-completion one,
we would code-complete once during consuming it and another time after the stream ended.

Fix this by making sure that, in this case, ConsumeAnyToken() will consume a code-completion
token without invoking code-completion.

rdar://12842503

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

11 years agoDon't reject __restrict applied to a dependent type; it might instantiate to a pointe...
Richard Smith [Wed, 27 Mar 2013 23:36:39 +0000 (23:36 +0000)]
Don't reject __restrict applied to a dependent type; it might instantiate to a pointer or reference type.

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

11 years agoSimplify test to use a count for the number of notes expected.
Bill Wendling [Wed, 27 Mar 2013 23:26:09 +0000 (23:26 +0000)]
Simplify test to use a count for the number of notes expected.

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

11 years agoUBSan: Don't diagnose inf/nan conversions between floating-point types. It's far...
Richard Smith [Wed, 27 Mar 2013 23:20:25 +0000 (23:20 +0000)]
UBSan: Don't diagnose inf/nan conversions between floating-point types. It's far from clear whether these have undefined behavior, and these checks are helping no-one. Keep the double->float overflow warnings, though, since those are useful in practice, even though it's unclear whether such operations have defined behavior.

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

11 years agoRemove unnecessary attributes from test case.
Chad Rosier [Wed, 27 Mar 2013 21:54:09 +0000 (21:54 +0000)]
Remove unnecessary attributes from test case.

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

11 years agoAdd a front-end test case for r178186.
Chad Rosier [Wed, 27 Mar 2013 21:50:39 +0000 (21:50 +0000)]
Add a front-end test case for r178186.

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

11 years agoFixes a typo in my last patch.
Fariborz Jahanian [Wed, 27 Mar 2013 21:33:52 +0000 (21:33 +0000)]
Fixes a typo in my last patch.

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

11 years agoRevert "[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__."
Argyrios Kyrtzidis [Wed, 27 Mar 2013 21:22:45 +0000 (21:22 +0000)]
Revert "[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__."

Per feedback by Doug, we should avoid platform-specific implementations
in lib/Headers as much as possible.

This reverts commit r178110.

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

11 years agoObjective-C: Issue more precise warning when user
Fariborz Jahanian [Wed, 27 Mar 2013 21:19:25 +0000 (21:19 +0000)]
Objective-C: Issue more precise warning when user
is accessing 'isa' as an object pointer.
// rdar://13503456. FixIt to follow in another patch.

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

11 years agoCleanup clang's specializations of simplify_type.
Rafael Espindola [Wed, 27 Mar 2013 19:38:14 +0000 (19:38 +0000)]
Cleanup clang's specializations of simplify_type.

Now that the basic implementation in llvm has been fixed, simplify the
specializations in clang.

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

11 years agoUpdate the error handing static functions for r178161.
Chad Rosier [Wed, 27 Mar 2013 18:28:23 +0000 (18:28 +0000)]
Update the error handing static functions for r178161.
Part of rdar://13296693

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

11 years ago[analyzer] Use evalBind for C++ new of scalar types.
Jordan Rose [Wed, 27 Mar 2013 18:10:35 +0000 (18:10 +0000)]
[analyzer] Use evalBind for C++ new of scalar types.

These types will not have a CXXConstructExpr to do the initialization for
them. Previously we just used a simple call to ProgramState::bindLoc, but
that doesn't trigger proper checker callbacks (like pointer escape).

Found by Anton Yartsev.

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

11 years ago[analyzer] Cleanup: only get the PostStmt when we need the underlying Stmt + comment
Anna Zaks [Wed, 27 Mar 2013 17:36:01 +0000 (17:36 +0000)]
[analyzer] Cleanup: only get the PostStmt when we need the underlying Stmt + comment

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

11 years ago[analyzer] Ensure that the node NilReceiverBRVisitor is looking for is not reclaimed
Anna Zaks [Wed, 27 Mar 2013 17:35:58 +0000 (17:35 +0000)]
[analyzer] Ensure that the node NilReceiverBRVisitor is looking for is not reclaimed

The visitor should look for the PreStmt node as the receiver is nil in the PreStmt and this is the node. Also, tag the nil
receiver nodes with a special tag for consistency.

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

11 years ago[modules] Make sure enabled diagnostic pragmas inside the module don't affect the...
Argyrios Kyrtzidis [Wed, 27 Mar 2013 17:17:23 +0000 (17:17 +0000)]
[modules] Make sure enabled diagnostic pragmas inside the module don't affect the translation unit that
imports the module.

Getting diagnostic sections from modules properly working is a fixme.

rdar://13516663

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

11 years agoInsert extra new line before access specifiers.
Alexander Kornienko [Wed, 27 Mar 2013 17:08:02 +0000 (17:08 +0000)]
Insert extra new line before access specifiers.

Summary: Insert extra new line before access specifiers.

Reviewers: djasper

Reviewed By: djasper

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

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

11 years ago<rdar://problem/13509689> Introduce -module-file-info option that provides informatio...
Douglas Gregor [Wed, 27 Mar 2013 16:47:18 +0000 (16:47 +0000)]
<rdar://problem/13509689> Introduce -module-file-info option that provides information about a particular module file.

This option can be useful for end users who want to know why they
ended up with a ton of different variants of the "std" module in their
module cache. This problem should go away over time, as we reduce the
need for module variants, but it will never go away entirely.

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

11 years agoAdd const in preparation for a simplify_type change in llvm.
Rafael Espindola [Wed, 27 Mar 2013 15:37:54 +0000 (15:37 +0000)]
Add const in preparation for a simplify_type change in llvm.

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

11 years agoAdd another expected note. Two errors => two notes.
Tim Northover [Wed, 27 Mar 2013 13:50:57 +0000 (13:50 +0000)]
Add another expected note. Two errors => two notes.

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

11 years agoDisable ASan/MSan symbolization of reports in tests.
Evgeniy Stepanov [Wed, 27 Mar 2013 13:11:46 +0000 (13:11 +0000)]
Disable ASan/MSan symbolization of reports in tests.

It was using an instrumented symbolizer binary, which is a potential fork bomb.

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

11 years agoMark comment-to-html-xml-conversion test as XFAIL:msan, in addition to valgrind.
Evgeniy Stepanov [Wed, 27 Mar 2013 13:05:40 +0000 (13:05 +0000)]
Mark comment-to-html-xml-conversion test as XFAIL:msan, in addition to valgrind.

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

11 years ago<rdar://problem/13317030> Consider using directives when performing unqualified name...
Douglas Gregor [Wed, 27 Mar 2013 12:51:49 +0000 (12:51 +0000)]
<rdar://problem/13317030> Consider using directives when performing unqualified name lookup into declarations contexts represented by the qualified-id but not in the actual scope hierarchy.

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

11 years agoSplit line comments
Alexander Kornienko [Wed, 27 Mar 2013 11:52:18 +0000 (11:52 +0000)]
Split line comments

Summary:
Split line comments that exceed column limit + fixed leading whitespace
handling when splitting block comments.

Reviewers: djasper, klimek

Reviewed By: djasper

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

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

11 years agoFix testcase to add expected note.
Bill Wendling [Wed, 27 Mar 2013 06:45:37 +0000 (06:45 +0000)]
Fix testcase to add expected note.

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

11 years agoPass the diagnostic in for better error messages.
Bill Wendling [Wed, 27 Mar 2013 06:06:26 +0000 (06:06 +0000)]
Pass the diagnostic in for better error messages.

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

11 years ago[lib/Headers] Break the module import cycle between _Builtin_intrinsics.sse and _Buil...
Argyrios Kyrtzidis [Wed, 27 Mar 2013 05:12:34 +0000 (05:12 +0000)]
[lib/Headers] Break the module import cycle between _Builtin_intrinsics.sse and _Builtin_intrinsics.sse2

Module "sse" implicitly exports module "sse2".
This is bad because we also have module "sse2" export module "sse" (as intended) so we end up with a cycle
in the module import graph:
1. sse2 -> (also imports) sse
2. sse -> (also imports) sse2

To eliminate the cycle remove 2.; importing module "sse2" will also import module "sse", but just importing
module "sse" will not also import module "sse2".

rdar://13240552

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

11 years agoImplement compiler intrinsics needed for compatibility with MSVC 2012 <type_traits>.
Joao Matos [Wed, 27 Mar 2013 01:34:16 +0000 (01:34 +0000)]
Implement compiler intrinsics needed for compatibility with MSVC 2012 <type_traits>.

Patch by me and Ryan Molden.

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

11 years ago[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:37 +0000 (01:25 +0000)]
[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.

This makes it identical with the system definition.

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

11 years ago[modules] Before marking the module imported macros as ambiguous, check if this is...
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:34 +0000 (01:25 +0000)]
[modules] Before marking the module imported macros as ambiguous, check if this is a case where
the system macro uses a not identical definition compared to a macro from the clang headers.

For example (these come from different modules):
   \#define LONG_MAX __LONG_MAX__ (clang's limits.h)
   \#define LONG_MAX 0x7fffffffffffffffL (system's limits.h)
in which case don't mark them ambiguous to avoid the "ambiguous macro expansion" warning.

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

11 years agoRemove IdentifierInfo::setHadMacroDefinition()
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:31 +0000 (01:25 +0000)]
Remove IdentifierInfo::setHadMacroDefinition()

It's not used anymore.

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

11 years ago[PCH/modules] Remove HiddenName::MacroUndef
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:28 +0000 (01:25 +0000)]
[PCH/modules] Remove HiddenName::MacroUndef

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

11 years ago[Preprocessor] Remove PPMutationListener.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:24 +0000 (01:25 +0000)]
[Preprocessor] Remove PPMutationListener.

It's not used anymore.

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

11 years ago[modules] Re-enable the "ambiguous expansion of macro" warning.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:19 +0000 (01:25 +0000)]
[modules] Re-enable the "ambiguous expansion of macro" warning.

Also update "test/Modules/macros.c" to test modified semantics:
-When there is an ambiguous macro, expand using the latest introduced version, not the first one.
-#undefs in submodules cause the macro to not be exported by that submodule, it doesn't cause
 undefining of macros in the translation unit that imported that submodule.
 This reduces macro namespace interference across modules.

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

11 years agoPR15597: Fix a confusion between the implicit exception specification and the
Richard Smith [Wed, 27 Mar 2013 00:22:47 +0000 (00:22 +0000)]
PR15597: Fix a confusion between the implicit exception specification and the
uninstantiated exception specification when a special member within a class
template is both defaulted and given an exception specification on its first
declaration.

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

11 years agoIf we're unable to create the TargetMachine, then just quit producing the
Chad Rosier [Wed, 27 Mar 2013 00:14:35 +0000 (00:14 +0000)]
If we're unable to create the TargetMachine, then just quit producing the
backend output; there's no need to report a fatal error.  This reverts r178042.
Part of rdar://13295753 and rdar://13401547

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

11 years agoUpdate debug info test for schema change made to LLVM.
David Blaikie [Wed, 27 Mar 2013 00:08:24 +0000 (00:08 +0000)]
Update debug info test for schema change made to LLVM.

This accounts for the addition of another field to DIScopes that will be used
to store a list of DIImportedModules in the future.

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

11 years agoMake the -Wreinterpret-base-class logic safe against invalid
John McCall [Wed, 27 Mar 2013 00:03:48 +0000 (00:03 +0000)]
Make the -Wreinterpret-base-class logic safe against invalid
declarations at any point. Patch by Alexander Zinenko, and
report by Richard Smith.

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

11 years agoSplit "incomplete implementation" warnings for ObjC into separate warnings.
Ted Kremenek [Wed, 27 Mar 2013 00:02:21 +0000 (00:02 +0000)]
Split "incomplete implementation" warnings for ObjC into separate warnings.

Previously all unimplemented methods for a class were grouped under
a single warning, with all the unimplemented methods mentioned
as notes.  Based on feedback from users, most users would like
a separate warning for each method, with a note pointing back to
the original method declaration.

Implements <rdar://problem/13350414>

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

11 years ago<rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference...
Douglas Gregor [Tue, 26 Mar 2013 23:59:23 +0000 (23:59 +0000)]
<rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference to an lvalue of compatible type.

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

11 years ago[analyzer] Better test for r178063.
Anna Zaks [Tue, 26 Mar 2013 23:58:52 +0000 (23:58 +0000)]
[analyzer] Better test for r178063.

Jordan pointed out that my previously committed test was bogus.

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

11 years ago[analyzer] Make sure IDC works for ‘NSContainer value/key is nil’ checks.
Anna Zaks [Tue, 26 Mar 2013 23:58:49 +0000 (23:58 +0000)]
[analyzer] Make sure IDC works for â€˜NSContainer value/key is nil’ checks.

Register the nil tracking visitors with the region and refactor trackNullOrUndefValue a bit.

Also adds the cast and paren stripping before checking if the value is an OpaqueValueExpr
or ExprWithCleanups.

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

11 years agoRemove magic number usage from CGDebugInfo with new DICompositeType::setContainingType
David Blaikie [Tue, 26 Mar 2013 23:47:35 +0000 (23:47 +0000)]
Remove magic number usage from CGDebugInfo with new DICompositeType::setContainingType

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

11 years ago[driver] Do not generate crash diagnostics if the compilation command failed
Chad Rosier [Tue, 26 Mar 2013 23:41:30 +0000 (23:41 +0000)]
[driver] Do not generate crash diagnostics if the compilation command failed
to execute as the crash will surely reoccur while generating the diagnostics.
rdar://13362359

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

11 years ago<rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns...
Douglas Gregor [Tue, 26 Mar 2013 23:36:30 +0000 (23:36 +0000)]
<rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns consistent results with invalid types.

When Sema::RequireCompleteType() is given a class template
specialization type that then fails to instantiate, it returns
'true'. On subsequent invocations, it can return false. Make sure that
this difference doesn't change the result of
Sema::CompareReferenceRelationship, which is expected to remain stable
while we're checking an initialization sequence.

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

11 years agoRemove a FIXME that's not planned to be fixed. We only generated crash
Chad Rosier [Tue, 26 Mar 2013 23:25:41 +0000 (23:25 +0000)]
Remove a FIXME that's not planned to be fixed.  We only generated crash
diagnostics for the first failing command.

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

11 years ago<rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return...
Douglas Gregor [Tue, 26 Mar 2013 22:43:55 +0000 (22:43 +0000)]
<rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return types.

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

11 years agoDebug Info: remove use of magic numbers to tweak specific debug info metadata fields
David Blaikie [Tue, 26 Mar 2013 22:09:53 +0000 (22:09 +0000)]
Debug Info: remove use of magic numbers to tweak specific debug info metadata fields

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

11 years ago[analyzer] Change inlining policy to inline small functions when reanalyzing ObjC...
Anna Zaks [Tue, 26 Mar 2013 18:57:58 +0000 (18:57 +0000)]
[analyzer] Change inlining policy to inline small functions when reanalyzing ObjC methods as top level.

This allows us to better reason about(inline) small wrapper functions.

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

11 years ago[analyzer] micro optimization as per Jordan’s feedback on r177905.
Anna Zaks [Tue, 26 Mar 2013 18:57:51 +0000 (18:57 +0000)]
[analyzer] micro optimization as per Jordan’s feedback on r177905.

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

11 years agoclang/test/CodeGenCXX/debug-info-namespace.cpp: Disable it on non-bash lit for now.
NAKAMURA Takumi [Tue, 26 Mar 2013 18:57:40 +0000 (18:57 +0000)]
clang/test/CodeGenCXX/debug-info-namespace.cpp: Disable it on non-bash lit for now.

With dosish filename, it misgenerates an improper extra entry.

!1 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX/debug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}

!8 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX\5Cdebug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}

!8 is unexpected.

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

11 years agoRemove useGlobalsForAutomaticVariables.
Rafael Espindola [Tue, 26 Mar 2013 18:41:47 +0000 (18:41 +0000)]
Remove useGlobalsForAutomaticVariables.

It is unused since pic support went away.

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

11 years ago[ms-cxxabi] Give the MS inheritance attributes a base class
Reid Kleckner [Tue, 26 Mar 2013 18:30:28 +0000 (18:30 +0000)]
[ms-cxxabi] Give the MS inheritance attributes a base class

Required making a handful of changes to the table generator.  Also adds
an unspecified inheritance attribute.  This opens the path for us to
apply these attributes to C++ records implicitly.

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

11 years agoFix uninitialized read of CalleeWithThisReturn.
Manman Ren [Tue, 26 Mar 2013 18:29:15 +0000 (18:29 +0000)]
Fix uninitialized read of CalleeWithThisReturn.

Initialize CalleeWithThisReturn to 0 in the constructor.
Also revert r170815 since checking CalleeWithThisReturn is faster.

PR15598

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

11 years agoFix a crasher by reporting a fatal error if we're unable to create the target
Chad Rosier [Tue, 26 Mar 2013 18:01:48 +0000 (18:01 +0000)]
Fix a crasher by reporting a fatal error if we're unable to create the target
machine and one is required.
Part of rdar://13295753

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

11 years agoAdd PRFCHW intrinsic support
Michael Liao [Tue, 26 Mar 2013 17:52:08 +0000 (17:52 +0000)]
Add PRFCHW intrinsic support

- Add head 'prfchwintrin.h' to define '_m_prefetchw' which is mapped to
  LLVM/clang prefetch builtin
- Add option '-mprfchw' to enable PRFCHW feature and pre-define '__PRFCHW__'
  macro

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

11 years ago[Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirect...
Argyrios Kyrtzidis [Tue, 26 Mar 2013 17:17:01 +0000 (17:17 +0000)]
[Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirective's subclasses.

For each macro directive (define, undefine, visibility) have a separate object that gets chained
to the macro directive history. This has several benefits:

-No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like
 PPMutationListener become unnecessary.
-No need to keep extra source locations for the undef/visibility locations for the define directive object
 (which is the majority of the directives)
-Much easier to hide/unhide a section in the macro directive history.
-Easier to track the effects of the directives across different submodules.

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

11 years ago[ms-cxxabi] Mangle vector types
Reid Kleckner [Tue, 26 Mar 2013 16:56:59 +0000 (16:56 +0000)]
[ms-cxxabi] Mangle vector types

Summary:
The only vector types a user can pass from MSVC code to clang code are
the ones from *mmintrin.h, so we only have to match the MSVC mangling
for these types.  MSVC mangles the __m128 family of types as tag types,
which we match.  For other vector types, we emit a unique tag type
mangling that won't match anything produced by MSVC.

Reviewers: rjmccall

CC: chandlerc, timurrrr, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D576

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

11 years agoFix uninitialized read of CalleeWithThisReturn.
Evgeniy Stepanov [Tue, 26 Mar 2013 13:44:29 +0000 (13:44 +0000)]
Fix uninitialized read of CalleeWithThisReturn.

CalleeWithThisReturn can be left initialized if HasThisReturn() is false.
This change reverses the order of checks in EmitFunctionEpilog such that
CalleeWithThisReturn is only examined when it has a meaningful value.

Found with MemorySanitizer.

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

11 years agoActually mark ASan-unfriendly test as XFAIL
Alexey Samsonov [Tue, 26 Mar 2013 08:45:29 +0000 (08:45 +0000)]
Actually mark ASan-unfriendly test as XFAIL

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

11 years agoAdd asan/msan to the list of available features in LIT test runner. Mark ASan-unfrien...
Alexey Samsonov [Tue, 26 Mar 2013 08:28:18 +0000 (08:28 +0000)]
Add asan/msan to the list of available features in LIT test runner. Mark ASan-unfriendly test as XFAIL.

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

11 years agoManually specify the link dependencies. Turns out that all the work on
Chandler Carruth [Tue, 26 Mar 2013 03:45:48 +0000 (03:45 +0000)]
Manually specify the link dependencies. Turns out that all the work on
LLVMBuild stuff didn't actually provide a single place for dependencies,
it just added a third place.

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

11 years agoHandle CXXOperatorCallExpr when checking self referrnce during initialization of
Richard Trieu [Tue, 26 Mar 2013 03:41:40 +0000 (03:41 +0000)]
Handle CXXOperatorCallExpr when checking self referrnce during initialization of
class types.

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

11 years agoThe IRReader header is now part of its own library. Update the include
Chandler Carruth [Tue, 26 Mar 2013 02:25:54 +0000 (02:25 +0000)]
The IRReader header is now part of its own library. Update the include
line and the library dependencies to reflect this.

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

11 years agoRemove FIXMEs: these are covered by a core issue which we don't yet implement
Richard Smith [Tue, 26 Mar 2013 01:17:18 +0000 (01:17 +0000)]
Remove FIXMEs: these are covered by a core issue which we don't yet implement
(but we happen to get this part right).

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

11 years agoImplement special-case name lookup for inheriting constructors: member
Richard Smith [Tue, 26 Mar 2013 01:15:19 +0000 (01:15 +0000)]
Implement special-case name lookup for inheriting constructors: member
using-declarations with names which look constructor-like are interpreted as
constructor names.

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

11 years agoRemove some no-op static_casts.
Richard Smith [Tue, 26 Mar 2013 00:54:11 +0000 (00:54 +0000)]
Remove some no-op static_casts.

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

11 years agoObjective-C: Property declaration overiding one in
Fariborz Jahanian [Mon, 25 Mar 2013 23:59:42 +0000 (23:59 +0000)]
Objective-C: Property declaration overiding one in
its super class or protocols inherit their
availability/deprecated attribute. // rdar://13467644

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

11 years agoclang/test/Index/crash-recovery-code-complete.c: Mark it as XFAIL:win32 for now.
NAKAMURA Takumi [Mon, 25 Mar 2013 23:49:11 +0000 (23:49 +0000)]
clang/test/Index/crash-recovery-code-complete.c: Mark it as XFAIL:win32 for now.

I know MemoryBuffer might affect this. Still investigating.

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

11 years ago<rdar://problem/13395022> Strip references when extracting an initializer_list's...
Douglas Gregor [Mon, 25 Mar 2013 23:47:01 +0000 (23:47 +0000)]
<rdar://problem/13395022> Strip references when extracting an initializer_list's element type during application of an initialization sequence.

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

11 years ago<rdar://problem/13185264> Don't crash when attempting to redundantly initialize a...
Douglas Gregor [Mon, 25 Mar 2013 23:28:23 +0000 (23:28 +0000)]
<rdar://problem/13185264> Don't crash when attempting to redundantly initialize a member of an anonymous union.

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

11 years agoFix layering violation harder.
Matt Beaumont-Gay [Mon, 25 Mar 2013 23:19:32 +0000 (23:19 +0000)]
Fix layering violation harder.

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

11 years ago<rdar://problem/13358795> Teach CMake to check Subversion version information at...
Douglas Gregor [Mon, 25 Mar 2013 23:16:38 +0000 (23:16 +0000)]
<rdar://problem/13358795> Teach CMake to check Subversion version information at build time, not configure time.

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

11 years agoFix testcase.
Ted Kremenek [Mon, 25 Mar 2013 23:05:40 +0000 (23:05 +0000)]
Fix testcase.

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

11 years agoFor printf checking, handle nested typedefs for darwin-specific checking.
Ted Kremenek [Mon, 25 Mar 2013 22:28:37 +0000 (22:28 +0000)]
For printf checking, handle nested typedefs for darwin-specific checking.

Fixes <rdar://problem/13491605>.

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

11 years ago<rdar://problem/13459871> Allow forward declaration of enums with a fixed underlying...
Douglas Gregor [Mon, 25 Mar 2013 22:22:35 +0000 (22:22 +0000)]
<rdar://problem/13459871> Allow forward declaration of enums with a fixed underlying type in Objective-C (as well as C++11).

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

11 years agoRemove local path from test.
Douglas Gregor [Mon, 25 Mar 2013 21:52:42 +0000 (21:52 +0000)]
Remove local path from test.

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

11 years agoUse <time.h> rather than <sys/time.h>
Douglas Gregor [Mon, 25 Mar 2013 21:51:16 +0000 (21:51 +0000)]
Use <time.h> rather than <sys/time.h>

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

11 years agoUse xargs rather than
Douglas Gregor [Mon, 25 Mar 2013 21:49:54 +0000 (21:49 +0000)]
Use xargs rather than

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

11 years agoFix a layering violation introduced in r177705.
Matt Beaumont-Gay [Mon, 25 Mar 2013 21:32:02 +0000 (21:32 +0000)]
Fix a layering violation introduced in r177705.

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

11 years agoUse 'touch -t', which both BSD and Linux support.
Douglas Gregor [Mon, 25 Mar 2013 21:27:57 +0000 (21:27 +0000)]
Use 'touch -t', which both BSD and Linux support.

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

11 years agoTry harder to be signal-safe inside our signal handler. The most prominent behavioural
Nick Lewycky [Mon, 25 Mar 2013 21:24:30 +0000 (21:24 +0000)]
Try harder to be signal-safe inside our signal handler. The most prominent behavioural
difference is that we no longer clean the token before emitting it. This fixes a bug where
clang hangs in the middle of crashing because the crash handler calls malloc from inside
a crash that happened inside of free.

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

11 years ago<rdar://problem/13434605> Periodically prune the module cache so that it does not...
Douglas Gregor [Mon, 25 Mar 2013 21:19:16 +0000 (21:19 +0000)]
<rdar://problem/13434605> Periodically prune the module cache so that it does not grow forever.

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

11 years agoCorrect indentation. No functionality change.
Nick Lewycky [Mon, 25 Mar 2013 21:10:14 +0000 (21:10 +0000)]
Correct indentation. No functionality change.

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

11 years agoEmit an error message instead of crashing when dereferencing an incomplete pointer...
Bill Wendling [Mon, 25 Mar 2013 21:09:49 +0000 (21:09 +0000)]
Emit an error message instead of crashing when dereferencing an incomplete pointer type.

If the ASM statement is dereferencing an incomplete pointer type, issue an error
instead of crashing.
<rdar://problem/12700799>

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

11 years agoIR-gen should not generate an MMX types unless the code is explicitly using MMX
Chad Rosier [Mon, 25 Mar 2013 21:00:27 +0000 (21:00 +0000)]
IR-gen should not generate an MMX types unless the code is explicitly using MMX
intrinsics.
rdar://13213542

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

11 years ago[analyzer] Set concrete offset bindings to UnknownVal when processing symbolic offset...
Anna Zaks [Mon, 25 Mar 2013 20:43:24 +0000 (20:43 +0000)]
[analyzer] Set concrete offset bindings to UnknownVal when processing symbolic offset binding, even if no bindings are present.

This addresses an undefined value false positive from concreteOffsetBindingIsInvalidatedBySymbolicOffsetAssignment.

Fixes PR14877; radar://12991168.

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

11 years agoAdded PR number for failing win64 tests.
Fariborz Jahanian [Mon, 25 Mar 2013 18:56:45 +0000 (18:56 +0000)]
Added PR number for failing win64 tests.

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

11 years agoRe-add clang-format tests to clang/test.
Daniel Jasper [Mon, 25 Mar 2013 09:14:25 +0000 (09:14 +0000)]
Re-add clang-format tests to clang/test.

Also now use -strict-whitespace as the tests are confusing otherwise.

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

11 years ago[analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free...
Anton Yartsev [Mon, 25 Mar 2013 01:35:45 +0000 (01:35 +0000)]
[analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free, and use-after-free problems of memory managed by new/delete.

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

11 years ago[analyzer] Teach ConstraintManager to ignore NonLoc <> NonLoc comparisons.
Jordan Rose [Sun, 24 Mar 2013 20:25:22 +0000 (20:25 +0000)]
[analyzer] Teach ConstraintManager to ignore NonLoc <> NonLoc comparisons.

These aren't generated by default, but they are needed when either side of
the comparison is tainted.

Should fix our internal buildbot.

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

11 years agoSimplify code. No functionality change.
Benjamin Kramer [Sun, 24 Mar 2013 16:04:55 +0000 (16:04 +0000)]
Simplify code. No functionality change.

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

11 years agoReject -no-integrated-as on windows.
Rafael Espindola [Sun, 24 Mar 2013 15:06:53 +0000 (15:06 +0000)]
Reject -no-integrated-as on windows.

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

11 years agoGenerate metadata to implement the -cl-kernel-arg-info option.
Guy Benyei [Sun, 24 Mar 2013 13:58:12 +0000 (13:58 +0000)]
Generate metadata to implement the -cl-kernel-arg-info option.
OpenCL 1.2 spec. 5.7.3.

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