]>
granicus.if.org Git - clang/log
Douglas Gregor [Thu, 25 Oct 2012 18:39:16 +0000 (18:39 +0000)]
When capturing 'this' in a lambda, make sure to update the set of
array-index starting values for the 'this' capture. Fixes
<rdar://problem/
12426831 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 25 Oct 2012 18:28:26 +0000 (18:28 +0000)]
Comment to XML conversion: avoid memory allocation while pretty-printing the
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166707
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 25 Oct 2012 18:16:02 +0000 (18:16 +0000)]
CommentDumper: reorder members and add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 25 Oct 2012 18:06:53 +0000 (18:06 +0000)]
Provide comment describing what buildBlockDescriptor does.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166703
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 25 Oct 2012 16:37:08 +0000 (16:37 +0000)]
Don't throw exceptions in clang-tblgen by switching to PrintFatalError.
Add locations in a number of places, where they are available for free.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166691
91177308 -0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 25 Oct 2012 15:39:14 +0000 (15:39 +0000)]
Cleanup some clang code to use new type functions instead of using cast<>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166684
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 25 Oct 2012 14:43:34 +0000 (14:43 +0000)]
clang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due to failing on i686-*-*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166683
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Tweed [Thu, 25 Oct 2012 13:56:30 +0000 (13:56 +0000)]
Correct test inovocations to use %clang_cc1 rather than direct invocation (so that it can have additional options set when trying to debug issues causing regressions).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166681
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Tweed [Thu, 25 Oct 2012 13:33:01 +0000 (13:33 +0000)]
Modify the targets to set appropriate calling convention defaults and C variables when using a gnueabihf or aapcs-vfp target.
Tested by me and Wei-Ren Chen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 25 Oct 2012 10:18:50 +0000 (10:18 +0000)]
Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166676
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 25 Oct 2012 09:38:41 +0000 (09:38 +0000)]
unittests/ToolingTest.cpp: Suppress newFrontendActionFactory.InjectsEndOfSourceFileCallback on Win32 for now. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Thu, 25 Oct 2012 08:49:11 +0000 (08:49 +0000)]
Adds the possibility to inject a callback that's called after each translation unit is processed.
This is important when one wants to deduplicate results during one run over a translation unit by pointer identity of AST nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166671
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 25 Oct 2012 02:14:12 +0000 (02:14 +0000)]
-fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 25 Oct 2012 01:51:45 +0000 (01:51 +0000)]
Take into account that there may be a BOM at the beginning of the file,
when computing the size of the precompiled preamble.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:34:38 +0000 (00:34 +0000)]
Update warning-flag test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166656
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Oct 2012 00:32:44 +0000 (00:32 +0000)]
Revert r166647 to rethink the patch...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166655
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:30:23 +0000 (00:30 +0000)]
Remove the old predefines-buffer diffing code completely. It's been
replaced by the more efficient, cleaner preprocessor-option version
that occurs earlier in PCH validation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166654
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:25:27 +0000 (00:25 +0000)]
Fix computation of predefines buffer from the preprocessor-option
checking, and disable the old predefines-buffer-diff'ing code path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166653
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 25 Oct 2012 00:12:49 +0000 (00:12 +0000)]
When we're devirtualizing a method call, make sure the method has the correct IR type.
Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166651
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:09:28 +0000 (00:09 +0000)]
ASTUnit doesn't actually care about the predefines; don't record them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166650
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:07:54 +0000 (00:07 +0000)]
The the preprocessor option validator to compute suggested
predefines. We're not quite ready to cut over to these suggested
predefines yet, however.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166648
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Oct 2012 00:05:55 +0000 (00:05 +0000)]
Add some support for diagnosing possibly mismatched constraint, type size and
modifiers. (From an idea by Eric...)
<rdar://problem/
12284092 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 25 Oct 2012 00:00:53 +0000 (00:00 +0000)]
'constexpr' and 'friend' are both declaration specifiers. Teach the parser this, for better error recovery.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166645
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 24 Oct 2012 23:51:56 +0000 (23:51 +0000)]
PR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclarator
rebuilds a function type, and that function type has parens around its name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 23:41:50 +0000 (23:41 +0000)]
Teach the PCH validator to check the preprocessor options, especially
the macros that are #define'd or #undef'd on the command line. This
checking happens much earlier than the current macro-definition
checking and is far cleaner, because it does a direct comparison
rather than a diff of the predefines buffers. Moreover, it allows us
to use the result of this check to skip over PCH files within a
directory that have non-matching -D's or -U's on the command
line. Finally, it improves the diagnostics a bit for mismatches,
fixing <rdar://problem/
8612222 >.
The old predefines-buffer diff'ing will go away in a subsequent commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166641
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 24 Oct 2012 22:52:04 +0000 (22:52 +0000)]
c-index-test.c: Split a format string. [-Woverlength-strings]
FIXME: They are still long strings without formatter in printf(3)!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166636
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 24 Oct 2012 22:22:12 +0000 (22:22 +0000)]
[ms-inline asm] Test case for r166632.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166633
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 24 Oct 2012 21:29:06 +0000 (21:29 +0000)]
Fix false positive in -Wunused-variable when a ctor call make involve cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 24 Oct 2012 20:28:18 +0000 (20:28 +0000)]
Update regression tests for r166617.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 24 Oct 2012 20:21:25 +0000 (20:21 +0000)]
Don't print scope qualifiers for references to a type defined locally in a function. Patch by Grzegorz Jablonski.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 24 Oct 2012 20:14:09 +0000 (20:14 +0000)]
Add an additional test for namespaces and -Wmissing-variable-declarations. Move C++ test into SemaCXX.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 20:05:57 +0000 (20:05 +0000)]
(De-)serialize the preprocessor options, including macros defined,
-include'd files, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166614
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 24 Oct 2012 18:34:26 +0000 (18:34 +0000)]
Add a test showing that nodebug is accepted in methods too. Patch by
Paul Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 24 Oct 2012 18:29:15 +0000 (18:29 +0000)]
[libclang] Add "-index-file-full" option that recursively indexes any imported
modules/PCH files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166605
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 17:49:01 +0000 (17:49 +0000)]
Explicitly specify C++98 when building the C++ precompiled header for this test, so that the test will work on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 24 Oct 2012 17:48:01 +0000 (17:48 +0000)]
[ms-inline asm] Add test cases for r166451.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166600
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 17:46:57 +0000 (17:46 +0000)]
Teach the preprocessor to hold onto the preprocessor options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 24 Oct 2012 17:23:06 +0000 (17:23 +0000)]
[ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 17:01:35 +0000 (17:01 +0000)]
Move PreprocessorOptions into the Lex library, and make it intrusively
reference-counted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 16:50:34 +0000 (16:50 +0000)]
(De-)serialize header search options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 16:24:38 +0000 (16:24 +0000)]
Update unit tests for HeaderSearch change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 16:19:39 +0000 (16:19 +0000)]
Move HeaderSearchOptions into the Lex library, make it intrusively
reference-counted, and hold a reference to it in HeaderSearch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 15:53:39 +0000 (15:53 +0000)]
Undef SEMANTIC_VALUE_DIAGOPT appropriately
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166579
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 15:49:58 +0000 (15:49 +0000)]
(De-)serialize the file system options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 15:17:15 +0000 (15:17 +0000)]
Serialize DiagnosticOptions to the AST file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166572
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mahesha S [Wed, 24 Oct 2012 15:12:40 +0000 (15:12 +0000)]
Removed an extra blank line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Wed, 24 Oct 2012 14:47:44 +0000 (14:47 +0000)]
Adds the possibility to run ASTMatchFinder over arbitrary AST nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166567
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 14:13:21 +0000 (14:13 +0000)]
Add a simple test involving decltype on Objective-C properties and ivars
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 14:11:55 +0000 (14:11 +0000)]
Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 24 Oct 2012 14:05:29 +0000 (14:05 +0000)]
Pass LLVM_ANDROID_TOOLCHAIN_DIR if set.
This lets one build ASan runtime for ARM/Android by running
make -C tools/clang/runtime/ \
LLVM_ANDROID_TOOLCHAIN_DIR=/path/to/ndk/toolchain
in an existing build tree.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166560
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 24 Oct 2012 13:34:53 +0000 (13:34 +0000)]
Update docs about TSan availability in CMake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166558
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 24 Oct 2012 13:21:51 +0000 (13:21 +0000)]
Fix some wordings in AddressSanitizer docs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166557
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 24 Oct 2012 12:22:56 +0000 (12:22 +0000)]
A number of test cases assume that an "int" parameter or return value
will be represented in the IR as a plain "i32" type. This causes the
tests to spuriously fail on platforms where int is not a 32-bit type,
or where the ABI requires attributes like "signext" or "zeroext" to
be used.
This patch adds -triple or -target parameters to force those tests
to use the i386-unknown-unknown target.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166551
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 24 Oct 2012 03:59:09 +0000 (03:59 +0000)]
Revert r166541, "clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532."
According to r166543, it is not needed for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166544
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 24 Oct 2012 03:52:31 +0000 (03:52 +0000)]
Clang now attempts to create a TargetMachine whenever a triple is given.
Many of our tests specify triples that are not built into clang.
In this commit we allow clang to fail loading the triple if we are only
using clang to emit llvm ir.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166543
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 24 Oct 2012 02:57:57 +0000 (02:57 +0000)]
clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 24 Oct 2012 02:37:03 +0000 (02:37 +0000)]
Add a test for -Warc-abi as requested by Fariborz.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166540
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 24 Oct 2012 01:59:00 +0000 (01:59 +0000)]
Add padding inreg registers to cause llvm to skip ecx when needed with
the x86_fastcallcc calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 24 Oct 2012 01:58:58 +0000 (01:58 +0000)]
Add inreg markers with the x86_fastcallcc calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166537
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Wed, 24 Oct 2012 01:14:28 +0000 (01:14 +0000)]
Address feedback from Eli Friedman on r166522.
In particular, we do want to warn on some unused cast subexpressions within
macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 24 Oct 2012 00:53:38 +0000 (00:53 +0000)]
Change EmitAssemblyHelper to create the target machine early
and use it to initialize the TargetTransformInfo analysis pass.
We need the TTI information for the loop vectorizer.
rdar://
12464901
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Tue, 23 Oct 2012 23:59:08 +0000 (23:59 +0000)]
[analyzer] Handle 'SomeVar.SomeEnumConstant', which is legal in C++.
This caused assertion failures analyzing LLVM.
<rdar://problem/
12560282 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Tue, 23 Oct 2012 23:59:05 +0000 (23:59 +0000)]
[analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.
After every 1000 CFGElements processed, the ExplodedGraph trims out nodes
that satisfy a number of criteria for being "boring" (single predecessor,
single successor, and more). Rather than controlling this with a cc1 option,
which can only disable this behavior, we now have an analyzer-config option,
'graph-trim-interval', which can change this interval from 1000 to something
else. Setting the value to 0 disables reclamation.
The next commit relies on this behavior to actually test anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 23 Oct 2012 23:42:25 +0000 (23:42 +0000)]
[ms-inline asm] Test case for r166526.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 23 Oct 2012 23:32:21 +0000 (23:32 +0000)]
[ms-inline asm] Update the triple to test r166523.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 23 Oct 2012 23:19:32 +0000 (23:19 +0000)]
Don't emit -Wunused-value warnings from macro expansions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166522
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 23:13:50 +0000 (23:13 +0000)]
Tweak include order
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166521
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 23:11:23 +0000 (23:11 +0000)]
Use a .def file for most of the diagnostic options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Oct 2012 23:06:22 +0000 (23:06 +0000)]
Objective-C: check that when a category method is being implemented,
method type in cateogry matches the implementation.
// rdar://
12519216
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 22:55:10 +0000 (22:55 +0000)]
Buildbot debugging is fun
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166516
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 22:43:37 +0000 (22:43 +0000)]
One last unit-test fix
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 22:38:58 +0000 (22:38 +0000)]
More unit-test fixes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166511
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 22:36:49 +0000 (22:36 +0000)]
Update clang-interpreter example
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166510
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 22:31:51 +0000 (22:31 +0000)]
Fixup unit tests for DiagnosticOptions change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166509
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 22:26:28 +0000 (22:26 +0000)]
Make DiagnosticOptions intrusively reference-counted, and make sure
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Tue, 23 Oct 2012 21:54:03 +0000 (21:54 +0000)]
CMake: Fix public header search for generating Xcode/MSVC projects.
Previously, we only had support for one level of library under lib/,
with the existence of the two-level lib/StaticAnalyzer/* hardcoded in
the top-level CMakeLists.txt. This became a problem with split of
libRewrite into several libraries -- with the same sub-names as the
libraries in lib/StaticAnalyzer/.
Now, we match up anything under lib/ to the corresponding directory
in include/clang/.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 23 Oct 2012 20:26:57 +0000 (20:26 +0000)]
Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 23 Oct 2012 20:23:23 +0000 (20:23 +0000)]
Delete junk that snuck into r166498.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166499
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 23 Oct 2012 20:19:32 +0000 (20:19 +0000)]
Add a new warning -Wmissing-variable-declarations, to warn about variables
defined without a previous declaration. This is similar to
-Wmissing-prototypes, but for variables instead of functions.
Patch by Ed Schouten.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 20:05:01 +0000 (20:05 +0000)]
Switch CodeGenOptions over to a .def file, like we do with LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 23 Oct 2012 19:56:01 +0000 (19:56 +0000)]
When rebuilding a DependentScopeDeclRefExpr, perform a lookup into the scope
even if it's dependent, in case it now names a member of the current instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 23 Oct 2012 17:44:40 +0000 (17:44 +0000)]
[ms-inline asm] Update for r166433.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 23 Oct 2012 17:07:31 +0000 (17:07 +0000)]
Handle -pthread, -pg and -shared correctly on bitrig.
Patch by David Hill.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 23 Oct 2012 16:35:44 +0000 (16:35 +0000)]
Fix some mdoc nits
Patch by Eitan Adler!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 23 Oct 2012 15:46:39 +0000 (15:46 +0000)]
Make hasDeclaration() matcher work inside the memberExpr() matcher.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166479
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 23 Oct 2012 10:43:00 +0000 (10:43 +0000)]
clang/test/PCH/pch-dir.c: Update a comment for msvc. msvc(*-win32) implies -std=c++11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 23 Oct 2012 10:40:50 +0000 (10:40 +0000)]
Implements the thisExpr matcher.
Patch by Gabor Horvath.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166477
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 23 Oct 2012 07:47:51 +0000 (07:47 +0000)]
clang/test/PCH/pch-dir.c: Mark it as XFAIL:msvc. It doesn't fail (virtually xpass) on msvc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166473
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 23 Oct 2012 07:01:50 +0000 (07:01 +0000)]
clang/test/PCH/pch-dir.c: Relax expressions of path separators for Win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Oct 2012 06:18:24 +0000 (06:18 +0000)]
If the precompiled header named by "-include" is actually a directory,
check each of the files within that directory to determine if any of
them is an AST file that matches the language and target options. If
so, the first matching AST file is loaded. This fixes a longstanding
discrepency with GCC's precompiled header implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 23 Oct 2012 06:15:26 +0000 (06:15 +0000)]
Fix -Wunused-value to not warn on expressions that have unresolved lookups due
to dependent arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 23 Oct 2012 04:09:38 +0000 (04:09 +0000)]
[libclang] Add an environment variable to disable thread background priotity, for testing
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 23 Oct 2012 02:43:30 +0000 (02:43 +0000)]
[ms-inline-asm] Add handling for errors coming out of the backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166463
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 23 Oct 2012 02:04:01 +0000 (02:04 +0000)]
Don't try to use inreg with 0 sized structs. Thanks to Eli for reporting the
regression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 23 Oct 2012 01:25:21 +0000 (01:25 +0000)]
[Options] Fix two options I mistransformed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166458
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 23 Oct 2012 00:32:41 +0000 (00:32 +0000)]
Ugly ugly hack for libstdc++-4.6 and libstdc++-4.7 compatibility. These
libraries have an incorrect definition of std::common_type (inherited from a
bug in the standard -- see LWG issue 2141), whereby they produce reference
types when they should not.
If we instantiate a typedef named std::common_type<...>::type, which is defined
in a system header as decltype(... ? ... : ...), and the decltype produces a
reference type, convert it to the non-reference type. (This doesn't affect any
LWG2141-conforming implementation of common_type, such as libc++'s, because the
default implementation of common_type<...>::type isn't supposed to produce a
reference type.)
This is horrible. I'm really sorry. :( Better ideas appreciated!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Oct 2012 23:59:45 +0000 (23:59 +0000)]
Handle implicitly-included PCH files the same way as
implicitly-included PTH files during initialization, delaying the
mapping down to the "original source file" until after later in the
initialization process.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Oct 2012 23:51:00 +0000 (23:51 +0000)]
Allow clients of the AST reader to specify what kinds of AST load
failures they know how to tolerate, e.g., out-of-date input files or
configuration/version mismatches. Suppress the corresponding
diagnostics if the client can handle it.
No clients actually use this functionality, yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Oct 2012 22:53:10 +0000 (22:53 +0000)]
Collapse ASTReader::ReadSLocEntryRecord() into its only caller,
ReadSLocEntry(). No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Oct 2012 22:50:17 +0000 (22:50 +0000)]
Distinguish the various kinds of AST file loading failures:
file corruption, compiler version mismatch, target/language
configuration mismatch, out-of-date AST file. No functionality change
yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166446
91177308 -0d34-0410-b5e6-
96231b3b80d8