]>
granicus.if.org Git - clang/log
Eli Friedman [Fri, 14 Oct 2011 22:48:56 +0000 (22:48 +0000)]
Add template instantiation support for AtomicExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 14 Oct 2011 21:54:42 +0000 (21:54 +0000)]
Teach the ASTImporter not to import redundant fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 14 Oct 2011 21:52:24 +0000 (21:52 +0000)]
Attempt to fix buildbot failure on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142008
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 14 Oct 2011 21:47:27 +0000 (21:47 +0000)]
vfork comes from unistd.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 14 Oct 2011 21:22:05 +0000 (21:22 +0000)]
Allow calling ASTUnit::LoadFromCompilerInvocationAction with a previously created ASTUnit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 14 Oct 2011 20:59:01 +0000 (20:59 +0000)]
Misc fixes for atomics. Biggest fix is doing alignment correctly for _Atomic types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142002
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 14 Oct 2011 20:48:27 +0000 (20:48 +0000)]
-Wc++98-compat: warn on C++11 attributes and alignas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141999
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 14 Oct 2011 20:41:13 +0000 (20:41 +0000)]
Test for r141985.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 14 Oct 2011 20:34:19 +0000 (20:34 +0000)]
Don't try to diagnose anything when we're passing incomplete types
through varargs. This only happens when we're in an unevaluated
context, where we don't want to trigger an error anyway. Fixes PR11131
/ <rdar://problem/
10288375 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141986
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 14 Oct 2011 20:31:37 +0000 (20:31 +0000)]
Reinstate r141898 (reverted in r141921), without the -Wc++98-compat-variadic-templates flag. Consensus is that -Wc++98-compat is a useful addition to clang, but per-C++11-feature warnings may not be.
Original patch by Jeffrey Yasskin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141985
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 14 Oct 2011 20:22:00 +0000 (20:22 +0000)]
Refactor static analyzer to use simpler interface to constant expression evaluation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 14 Oct 2011 19:58:02 +0000 (19:58 +0000)]
[temp.explicit]p1: constexpr cannot be specified in explicit instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141982
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 14 Oct 2011 19:50:08 +0000 (19:50 +0000)]
Fix the CXX_INCLUDE_ROOT case that was out of date with ScanLibDirForGCCTriple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 14 Oct 2011 19:03:46 +0000 (19:03 +0000)]
Harden test for windows paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 14 Oct 2011 18:45:37 +0000 (18:45 +0000)]
Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 14 Oct 2011 18:45:16 +0000 (18:45 +0000)]
Simplify code to avoid a useless string copy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 14 Oct 2011 18:45:11 +0000 (18:45 +0000)]
Upgrade to PathV2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 14 Oct 2011 18:45:06 +0000 (18:45 +0000)]
Add parens to pacify GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 14 Oct 2011 18:35:31 +0000 (18:35 +0000)]
Fix misplaced comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 14 Oct 2011 18:31:36 +0000 (18:31 +0000)]
Make value kind based on the return type of the getter, not
property type, for when getter may be a reference type.
// rdar://
10188258 revised.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 14 Oct 2011 17:41:52 +0000 (17:41 +0000)]
[PCH] Serialize info about redeclared objc methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141964
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 14 Oct 2011 17:34:53 +0000 (17:34 +0000)]
Add flags for the remaining shift related warnings
(-Wshift-count-negative, -Wshift-count-overflow).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141962
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 14 Oct 2011 17:34:08 +0000 (17:34 +0000)]
objc-arc: Improve arc diagnostic when method is not
found in receiver's class. // rdar://
9970739
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 14 Oct 2011 16:55:33 +0000 (16:55 +0000)]
Add __nodebug__ attribute to functions in arm_neon.h
This matches what we do for Intel vector intrinsics. <rdar://problem/
10280207 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 14 Oct 2011 15:55:40 +0000 (15:55 +0000)]
Under ARC, merge the bit corresponding to the ns_returns_retained
attribute from the first declaration to later declarations. Fixes
<rdar://problem/
10142572 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Fri, 14 Oct 2011 15:36:25 +0000 (15:36 +0000)]
Only warn in -Wliteral-conversion if the conversion loses information
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 14 Oct 2011 15:31:12 +0000 (15:31 +0000)]
When declaring an out-of-line template, attempt to rebuild any types
within the template parameter list that may have changed now that we
know the current instantiation. Fixes <rdar://problem/
10194295 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Erik Verbruggen [Fri, 14 Oct 2011 15:31:08 +0000 (15:31 +0000)]
Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to
retrieve annotations from completion string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 14 Oct 2011 08:02:31 +0000 (08:02 +0000)]
Really protect from infinite loop when there are objc method redeclarations.
Serialization part will come later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141950
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 14 Oct 2011 07:58:10 +0000 (07:58 +0000)]
Updating the Clang website to refer to C++'11 instead of C++'0x
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141949
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 14 Oct 2011 06:48:06 +0000 (06:48 +0000)]
Keep track of objc method redeclarations in the same interface.
Avoid possible infinite loop when iterating over an ObjCMethod's redeclarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141946
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 14 Oct 2011 05:03:44 +0000 (05:03 +0000)]
Use Triple.isOSDarwin() instead of comparing against Triple::Darwin.
There are now separate Triple::MacOSX and Triple::IOS values for the OS
so comparing against Triple::Darwin will fail to match those. Note that
I changed the expected output for the Driver/rewrite-objc.m test, which had
previously not been passing Darwin-specific options with the macosx triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141944
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 14 Oct 2011 04:15:19 +0000 (04:15 +0000)]
Update open source static analyzer build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 14 Oct 2011 04:15:15 +0000 (04:15 +0000)]
Move doxygen comments to pair with the actual values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 14 Oct 2011 02:27:24 +0000 (02:27 +0000)]
PR11124: Don't overwrite memory outside of a base class when performing zero-initialization before running its constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141933
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 14 Oct 2011 00:54:15 +0000 (00:54 +0000)]
Fix grammaro
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141927
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 14 Oct 2011 00:49:43 +0000 (00:49 +0000)]
Add a preprocessor callback that is invoked every time the 'defined'
operator is seen, from Jason Haslam!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141926
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 14 Oct 2011 00:34:28 +0000 (00:34 +0000)]
Add support for -std=gnu90 and -std=c++03, for compatibility with modern gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Fri, 14 Oct 2011 00:04:00 +0000 (00:04 +0000)]
Revert the -Wc++98-compat flag because dgregor doesn't like it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 13 Oct 2011 23:45:45 +0000 (23:45 +0000)]
objc-arc: 'Class' property is implicitly __unsafe_unretained.
// rdar://
10239594
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141915
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 13 Oct 2011 23:32:09 +0000 (23:32 +0000)]
Rename -Wc++0x-compat, -Wc++0x-extensions and -Wc++0x-narrowing from c++0x to
c++11. The old names are kept for backwards-compatibility. Patch by Ahmed
Charles! Names for backwards-compatible DiagGroups removed by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141913
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Thu, 13 Oct 2011 23:26:59 +0000 (23:26 +0000)]
Fix a test case where FileCheck is used to test code corrected by -fixit.
If the code file is not run through the preproccessor to remove comments,
then FileCheck will match the strings within the CHECK commands rendering
the test useless.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 13 Oct 2011 22:45:21 +0000 (22:45 +0000)]
Convert newly-added test from -std=c++0x to -std=c++11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141904
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 13 Oct 2011 22:30:23 +0000 (22:30 +0000)]
Extend -Wno-sizeof-array-argument to strncpy and friends.
This finds 2 bugs in chromium and 1 in hunspell, with 0 false positives.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141902
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 13 Oct 2011 22:29:44 +0000 (22:29 +0000)]
Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 13 Oct 2011 22:18:05 +0000 (22:18 +0000)]
Implement the first piece of a -Wc++98-compat flag so that people can build in
C++11 mode but keep their sources compatible with C++98. This patch implements
the -Wc++98-compat-variadic-templates sub-flag and -Wc++98-compat to include
it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141898
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 13 Oct 2011 21:45:18 +0000 (21:45 +0000)]
Recommit:
Start handling debug line and scope information better:
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://
10246360
after fixing a few bugs that were exposed in gdb testsuite testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141893
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 13 Oct 2011 21:32:47 +0000 (21:32 +0000)]
Add test for new -std=c++11 and -std=gnu++11 command-line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141891
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 13 Oct 2011 20:45:37 +0000 (20:45 +0000)]
Add triple for RHEL 5 to the libpath collecting logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141887
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 13 Oct 2011 18:50:06 +0000 (18:50 +0000)]
Tweak -Wuninitialized's handling of 'int x = x' to report that as the root cause of an uninitialized variable IFF there are other uses of that uninitialized variable. Fixes <rdar://problem/
9259237 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141881
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 13 Oct 2011 18:26:27 +0000 (18:26 +0000)]
HasFormOfMemberPointer implies IsAddressOfOperand for an overload set. Simplify
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 13 Oct 2011 18:10:35 +0000 (18:10 +0000)]
Allow calling an overloaded function set by taking the address of the
functions, e.g., (&f)(0). Fixes <rdar://problem/
9803316 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141877
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 13 Oct 2011 16:24:41 +0000 (16:24 +0000)]
TCE target: conversion of OpenCL reqd_work_group_size attr to metadata
Patch by Pekka Jääskeläinen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141865
91177308 -0d34-0410-b5e6-
96231b3b80d8
Erik Verbruggen [Thu, 13 Oct 2011 09:41:32 +0000 (09:41 +0000)]
Allow for annotate attributes after access specifiers. When such
attributes are found, propagate them to subsequent declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141861
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 13 Oct 2011 06:08:43 +0000 (06:08 +0000)]
Fix crash-on-invalid, improve error recovery, and test coverage for missing colon after access specifiers in C++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141852
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 Oct 2011 23:56:54 +0000 (23:56 +0000)]
Fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141837
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 12 Oct 2011 20:35:48 +0000 (20:35 +0000)]
When we determine that a function template specialization produced as
part of template argument deduction is ill-formed, we mark it as
invalid and treat it as a deduction failure. If we happen to find that
specialization again, treat it as a deduction failure rather than
silently building a call to the declaration.
Fixes PR11117, a marvelous bug where deduction failed after creating
an invalid specialization, causing overload resolution to pick a
different candidate. Then we performed a similar overload resolution
later, and happily picked the invalid specialization to
call... resulting in a silent link failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141809
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 12 Oct 2011 20:06:09 +0000 (20:06 +0000)]
Add test case for __has_warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 12 Oct 2011 19:55:31 +0000 (19:55 +0000)]
Change __extension__ to disable only diagnostics controlled by -pedantic.
This changes clang to match GCC's behavior for __extension__, which temporarily
disables the -pedantic flag. Warnings that are enabled without -pedantic
are not affected. Besides the general goodness of matching GCC's precedent,
my motivation for this is that macros in the arm_neon.h header need to use
__extension__ to avoid pedantic complaints about their use of statement
expressions, yet we still want to warn about incompatible pointer arguments
for those macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 Oct 2011 19:51:18 +0000 (19:51 +0000)]
Add returns_twice to functions that are known to return twice. This implements
the same behavior of gcc by keeping the attribute out of the function type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141803
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 12 Oct 2011 19:46:30 +0000 (19:46 +0000)]
Implement built-in macro '__has_warning', which allows one to query if a warning flag is valid. Fixes <rdar://problem/
10263428 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 12 Oct 2011 19:26:40 +0000 (19:26 +0000)]
Switch diagnostic text from "C++0x" over to "C++11".
We'd also like for "C++11" or "c++11" to be used for the warning
groups, but without removing the old warning flags. Patches welcome;
I've run out of time to work on this today.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 12 Oct 2011 18:51:02 +0000 (18:51 +0000)]
We do parse hexfloats in C++11; make it actually work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 12 Oct 2011 18:39:35 +0000 (18:39 +0000)]
Revert file/scope handling patches. gdb testing revealed a couple of bugs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 12 Oct 2011 18:28:53 +0000 (18:28 +0000)]
The Objective-C rewriter uses the fragile ABI, always.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141795
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 12 Oct 2011 18:03:37 +0000 (18:03 +0000)]
Fix typo in name of diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141793
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 12 Oct 2011 17:36:33 +0000 (17:36 +0000)]
Handle the case where preprocessor entities are not received in order,
fixes http://llvm.org/PR11120
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141788
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 12 Oct 2011 17:32:39 +0000 (17:32 +0000)]
Add -std=c++11 and -std=gnu++11 language flags, from Ahmed Charles
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141785
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 12 Oct 2011 16:37:45 +0000 (16:37 +0000)]
Introduce BalancedDelimiterTracker, to better track open/close
delimiter pairs and detect when we exceed the implementation limit for
nesting depth, from Aaron Ballman!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141782
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 12 Oct 2011 15:40:49 +0000 (15:40 +0000)]
Teach __has_nothrow_assign not to complain about access (GCC and EDG
ignore access entirely for it) and not to crash on assignment operator
templates. Fixes PR11110.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Goodnow II [Wed, 12 Oct 2011 09:55:01 +0000 (09:55 +0000)]
Removed extra line in comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141773
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 12 Oct 2011 09:30:58 +0000 (09:30 +0000)]
Add target info for Linux on PPC & Sparc.
Patch by Hal Finkel!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 12 Oct 2011 07:07:40 +0000 (07:07 +0000)]
Introduce SourceManager::getFileLoc which returns a file location
taking into account macro arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141771
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 12 Oct 2011 07:07:36 +0000 (07:07 +0000)]
[libclang] Allow using getDeclCursorUSR function with a Decl* and not a cursor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 12 Oct 2011 07:07:33 +0000 (07:07 +0000)]
[libclang] Make MakeCXTranslationUnit usable outside CIndex.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 12 Oct 2011 05:08:15 +0000 (05:08 +0000)]
constexpr: don't consider class types with mutable members to be literal types.
The standard doesn't allow this, but mutable constexpr variables break the
semantics so badly that we can't reasonably accept them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141768
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 12 Oct 2011 01:11:30 +0000 (01:11 +0000)]
Remember to set the location in EmitGlobalVariable to the current decl
if we're going to delete the setLocation as we did in 141732.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 12 Oct 2011 00:37:51 +0000 (00:37 +0000)]
Handle Perforce-style conflict markers like normal conflict markers. Perforce
swaps over the <<<< and >>>> markers, and uses shorter markers than traditional
tools.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 12 Oct 2011 00:00:57 +0000 (00:00 +0000)]
objc: note location of the previously declared
property in the diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141745
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 11 Oct 2011 23:14:30 +0000 (23:14 +0000)]
Catch placeholder types in DefaultLvalueConversion
and DefaultFunctionArrayLvalueConversion. To prevent
significant regression for should-this-be-a-call fixits,
and to repair some such regression from the introduction of
bound member placeholders, make those placeholder checks
try to build calls appropriately. Harden the build-a-call
logic while we're at it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141738
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 11 Oct 2011 23:02:37 +0000 (23:02 +0000)]
objc rewriter: Restore objc_msgSend_stret/objc_msgSendSuper_stret declaration
to their fragile-abi representation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Oct 2011 23:00:55 +0000 (23:00 +0000)]
Start handling debug line and scope information better:
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://
10246360
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Oct 2011 23:00:51 +0000 (23:00 +0000)]
80-column and tab cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Oct 2011 23:00:45 +0000 (23:00 +0000)]
Reorder this to make it easier to add more changes for a location set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141730
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 11 Oct 2011 22:09:24 +0000 (22:09 +0000)]
PR11062: Make C99 inlining work properly for names with associated builtin libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 11 Oct 2011 21:51:31 +0000 (21:51 +0000)]
Fix test: don't use __thread without a target triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141719
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 11 Oct 2011 21:43:33 +0000 (21:43 +0000)]
Constant expression evaluation: refactor value initialization and scalar list initialization into base class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141717
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 11 Oct 2011 20:00:47 +0000 (20:00 +0000)]
Silence some -Wuninitialized false positives with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141701
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 11 Oct 2011 19:57:52 +0000 (19:57 +0000)]
Add a -Wc++0x-compat warning for C++11 keywords used as identifiers when in
C++98 mode. Only the first occurrence of each keyword will produce a warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 11 Oct 2011 19:27:55 +0000 (19:27 +0000)]
Add support for viewing the module graph via Graphviz, for debugging
purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Oct 2011 18:20:16 +0000 (18:20 +0000)]
Driver: Add support for a new -nostdlibinc option.
- This disables the system include directories, but not the compiler builtin
directories. Useful for projects that want to use things like the intrinsic
headers, but are otherwise freestanding.
- I'm willing to reconsider the option naming, I also considered providing an
explicit -builtinc (which would match -nobuiltininc), but this is more
consistent with existing options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Oct 2011 18:20:10 +0000 (18:20 +0000)]
Frontend: Replace -nostdinc by -nostdsysteminc (which is just system include
paths). The -nostdinc behavior is now -nostdsysteminc + -nobuiltininc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141691
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 11 Oct 2011 18:19:20 +0000 (18:19 +0000)]
[analyzer] Remove an unused member variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141690
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 11 Oct 2011 17:38:55 +0000 (17:38 +0000)]
Rename SemaCXXCast.cpp to SemaCast.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 11 Oct 2011 17:38:48 +0000 (17:38 +0000)]
Add more testing for -Wc++0x-compat warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 11 Oct 2011 17:29:59 +0000 (17:29 +0000)]
[analyzer] CheckerContext updates checkDst in it's destructor, so make sure the object is destructed before checkDst is used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 11 Oct 2011 17:29:44 +0000 (17:29 +0000)]
For the FileChanged Preprocessor callback, when exiting a file, pass its FileID.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Tue, 11 Oct 2011 17:17:40 +0000 (17:17 +0000)]
Add an explanatory comment to test/SemaCXX/typo-correction.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141680
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 11 Oct 2011 16:49:54 +0000 (16:49 +0000)]
[analyzer] Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Tue, 11 Oct 2011 06:43:29 +0000 (06:43 +0000)]
Get rid of ShouldDeleteMoveConstructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141650
91177308 -0d34-0410-b5e6-
96231b3b80d8