Richard Smith
e41fac231c
Add -Wc++98-compat warning for deduced 'auto' type specifier.
...
llvm-svn: 142057
2011-10-15 05:42:01 +00:00
Richard Smith
5d164bc5e0
Implement -Wc++98-compat warnings for the parser.
...
llvm-svn: 142056
2011-10-15 05:09:34 +00:00
Richard Smith
da2611199b
Refactor: remove redundant check for 'final' specifier when parsing class/struct definition.
...
llvm-svn: 142054
2011-10-15 04:21:46 +00:00
Richard Smith
bffe88027c
Rename an ExtWarn to ext_ for consistency.
...
llvm-svn: 142049
2011-10-15 03:55:17 +00:00
Richard Smith
2db9652b5a
Don't warn about use of 'final' in ill-formed C++98 code which didn't use
...
'final', and don't accept (then silently discard) braced init lists in C++98
new-expressions.
llvm-svn: 142048
2011-10-15 03:38:41 +00:00
Eli Friedman
27ef75b0be
Handle an edge case involving the conditional operator and throw expressions. PR10582.
...
llvm-svn: 142047
2011-10-15 02:10:40 +00:00
Chandler Carruth
09c7464312
Change 'Emit' to 'EmitCaret' which sums up what it *should* be doing.
...
Also note that it is actually doing much more than it should. This paves
the way for building a more generic 'Emit' routine that is the real
entry point here.
llvm-svn: 142035
2011-10-15 01:21:55 +00:00
Richard Smith
acd4d3d52a
-Wc++98-compat warnings for the lexer.
...
This also adds a -Wc++98-compat-pedantic for warning on constructs which would
be diagnosed by -std=c++98 -pedantic (that is, it warns even on C++11 features
which we enable by default, with no warning, in C++98 mode).
llvm-svn: 142034
2011-10-15 01:18:56 +00:00
Douglas Gregor
9e0a5b3900
Teach the ASTImporter to perform DeclContext lookups in a way that
...
avoids loading data from an external source, since those lookups were
causing some "interesting" recursion in LLDB.
This code is not efficient. I plan to remedy this inefficiency in a
follow-up commit.
llvm-svn: 142023
2011-10-15 00:10:27 +00:00
Peter Collingbourne
60188eb8bf
Add c_alignas and cxx_alignas features
...
llvm-svn: 142020
2011-10-14 23:44:46 +00:00
Anton Korobeynikov
f0c267e6e0
Provide half floating point support as a storage only type.
...
Lack of half FP was a regression compared to llvm-gcc.
llvm-svn: 142016
2011-10-14 23:23:15 +00:00
Eli Friedman
1e7a0c6a1d
Attempt to fix Windows buildbot, round 2.
...
llvm-svn: 142014
2011-10-14 23:10:30 +00:00
Eli Friedman
8d3e43ff4a
Add template instantiation support for AtomicExpr.
...
llvm-svn: 142012
2011-10-14 22:48:56 +00:00
Douglas Gregor
03d1ed304b
Teach the ASTImporter not to import redundant fields.
...
llvm-svn: 142009
2011-10-14 21:54:42 +00:00
Eli Friedman
e2c600cf43
Attempt to fix buildbot failure on Windows.
...
llvm-svn: 142008
2011-10-14 21:52:24 +00:00
Argyrios Kyrtzidis
1ac5da1017
Allow calling ASTUnit::LoadFromCompilerInvocationAction with a previously created ASTUnit.
...
llvm-svn: 142004
2011-10-14 21:22:05 +00:00
Eli Friedman
4b72fddd99
Misc fixes for atomics. Biggest fix is doing alignment correctly for _Atomic types.
...
llvm-svn: 142002
2011-10-14 20:59:01 +00:00
Richard Smith
f679b5b6a6
-Wc++98-compat: warn on C++11 attributes and alignas.
...
llvm-svn: 141999
2011-10-14 20:48:27 +00:00
Douglas Gregor
7e1aa5b7ac
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>.
llvm-svn: 141986
2011-10-14 20:34:19 +00:00
Richard Smith
96bd62f769
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.
llvm-svn: 141985
2011-10-14 20:31:37 +00:00
Richard Smith
faa32a9b83
Refactor static analyzer to use simpler interface to constant expression evaluation.
...
llvm-svn: 141983
2011-10-14 20:22:00 +00:00
Richard Smith
465841e48c
[temp.explicit]p1: constexpr cannot be specified in explicit instantiations.
...
llvm-svn: 141982
2011-10-14 19:58:02 +00:00
Rafael Espindola
c0b9791b63
Fix the CXX_INCLUDE_ROOT case that was out of date with ScanLibDirForGCCTriple.
...
llvm-svn: 141980
2011-10-14 19:50:08 +00:00
Benjamin Kramer
b89514a9b8
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*.
llvm-svn: 141971
2011-10-14 18:45:37 +00:00
Benjamin Kramer
47b5b31e61
Simplify code to avoid a useless string copy.
...
llvm-svn: 141970
2011-10-14 18:45:16 +00:00
Benjamin Kramer
fd0b05f341
Upgrade to PathV2.
...
llvm-svn: 141969
2011-10-14 18:45:11 +00:00
Benjamin Kramer
13481e27cb
Add parens to pacify GCC.
...
llvm-svn: 141968
2011-10-14 18:45:06 +00:00
Fariborz Jahanian
e1e17cd8e2
Fix misplaced comment.
...
llvm-svn: 141967
2011-10-14 18:35:31 +00:00
Fariborz Jahanian
03df2b2e56
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.
llvm-svn: 141966
2011-10-14 18:31:36 +00:00
Argyrios Kyrtzidis
db21596473
[PCH] Serialize info about redeclared objc methods.
...
llvm-svn: 141964
2011-10-14 17:41:52 +00:00
Douglas Gregor
f1404d7d49
Under ARC, merge the bit corresponding to the ns_returns_retained
...
attribute from the first declaration to later declarations. Fixes
<rdar://problem/10142572>.
llvm-svn: 141957
2011-10-14 15:55:40 +00:00
Matt Beaumont-Gay
c622163b0f
Only warn in -Wliteral-conversion if the conversion loses information
...
llvm-svn: 141955
2011-10-14 15:36:25 +00:00
Douglas Gregor
041b084f73
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>.
llvm-svn: 141954
2011-10-14 15:31:12 +00:00
Erik Verbruggen
98ea7f6737
Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to
...
retrieve annotations from completion string.
llvm-svn: 141953
2011-10-14 15:31:08 +00:00
Argyrios Kyrtzidis
dcaaa21fbe
Really protect from infinite loop when there are objc method redeclarations.
...
Serialization part will come later.
llvm-svn: 141950
2011-10-14 08:02:31 +00:00
Argyrios Kyrtzidis
c5e829cad2
Keep track of objc method redeclarations in the same interface.
...
Avoid possible infinite loop when iterating over an ObjCMethod's redeclarations.
llvm-svn: 141946
2011-10-14 06:48:06 +00:00
Bob Wilson
6524dd33be
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.
llvm-svn: 141944
2011-10-14 05:03:44 +00:00
Eli Friedman
fde961dbf3
PR11124: Don't overwrite memory outside of a base class when performing zero-initialization before running its constructor.
...
llvm-svn: 141933
2011-10-14 02:27:24 +00:00
Douglas Gregor
82e0d728e8
Add a preprocessor callback that is invoked every time the 'defined'
...
operator is seen, from Jason Haslam!
llvm-svn: 141926
2011-10-14 00:49:43 +00:00
Jeffrey Yasskin
de8a104633
Revert the -Wc++98-compat flag because dgregor doesn't like it.
...
llvm-svn: 141921
2011-10-14 00:04:00 +00:00
Fariborz Jahanian
df4f7ca331
objc-arc: 'Class' property is implicitly __unsafe_unretained.
...
// rdar://10239594
llvm-svn: 141915
2011-10-13 23:45:45 +00:00
Richard Smith
31ce793a0b
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.
llvm-svn: 141913
2011-10-13 23:32:09 +00:00
Nico Weber
39bfed8ad6
Extend -Wno-sizeof-array-argument to strncpy and friends.
...
This finds 2 bugs in chromium and 1 in hunspell, with 0 false positives.
llvm-svn: 141902
2011-10-13 22:30:23 +00:00
Jeffrey Yasskin
a722170eb9
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.
llvm-svn: 141898
2011-10-13 22:18:05 +00:00
Eric Christopher
7cdf948601
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.
llvm-svn: 141893
2011-10-13 21:45:18 +00:00
Benjamin Kramer
74a1f91ff7
Add triple for RHEL 5 to the libpath collecting logic.
...
llvm-svn: 141887
2011-10-13 20:45:37 +00:00
Ted Kremenek
596fa16dd3
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>.
...
llvm-svn: 141881
2011-10-13 18:50:06 +00:00
Douglas Gregor
f4a06c2104
HasFormOfMemberPointer implies IsAddressOfOperand for an overload set. Simplify
...
llvm-svn: 141878
2011-10-13 18:26:27 +00:00
Douglas Gregor
cda2270217
Allow calling an overloaded function set by taking the address of the
...
functions, e.g., (&f)(0). Fixes <rdar://problem/9803316>.
llvm-svn: 141877
2011-10-13 18:10:35 +00:00
Peter Collingbourne
adcf7c9203
TCE target: conversion of OpenCL reqd_work_group_size attr to metadata
...
Patch by Pekka Jääskeläinen!
llvm-svn: 141865
2011-10-13 16:24:41 +00:00