Rafael Espindola
8c0739d332
Revert r166855. I can reproduce the bootstrap failure and have a testcase
...
to reduce.
llvm-svn: 166863
2012-10-27 03:06:02 +00:00
Argyrios Kyrtzidis
668bf82658
Add a test case for the stack overflow in rdar://12542261
...
llvm-svn: 166858
2012-10-27 02:13:28 +00:00
Rafael Espindola
c5f9943a60
Fix cases where we were not producing an error when a computed goto could
...
jump over destructor calls.
Fixes pr13812.
llvm-svn: 166855
2012-10-27 01:17:42 +00:00
Rafael Espindola
9c006de3d3
Move two helper functions to AST so that sema can use them.
...
llvm-svn: 166853
2012-10-27 01:03:43 +00:00
Rafael Espindola
b9d75ca84b
Refactor some code into a new findMaterializedTemporary function.
...
llvm-svn: 166849
2012-10-27 00:43:14 +00:00
Rafael Espindola
b413676cd7
Refactor some code into a new skipRValueSubobjectAdjustments function.
...
llvm-svn: 166848
2012-10-27 00:40:06 +00:00
Rafael Espindola
e7b11f5241
Delay codegen to after collecting all SubobjectAdjustment so that the collection
...
can be refactored and used in Sema.
llvm-svn: 166847
2012-10-27 00:36:38 +00:00
Eli Friedman
ef5df7b8eb
Fix typo.
...
llvm-svn: 166833
2012-10-26 23:25:42 +00:00
Eli Friedman
fc5b2effcf
Add missing safety check to an optimization for do-while loops. PR14191.
...
llvm-svn: 166832
2012-10-26 23:23:35 +00:00
Eli Friedman
a7137bc1c2
Fix indentation.
...
llvm-svn: 166830
2012-10-26 23:05:34 +00:00
Argyrios Kyrtzidis
c38395a0f7
In Parser::ParseDecltypeSpecifier, make sure the end location it returns
...
is at the end of parsed tokens when an error occurs, otherwise we'll hit
an assertion when trying to annotate the decltype tokens.
llvm-svn: 166826
2012-10-26 22:53:44 +00:00
Eli Friedman
0e84602d5c
Don't crash synthesizing an ObjC property with an empty struct type. <rdar://problem/12547611>.
...
llvm-svn: 166825
2012-10-26 22:38:05 +00:00
Douglas Gregor
1423a5cfd7
When an externally-supplied record layout has a size that clearly
...
doesn't include padding up to the alignment of the record, take this
as a cue that the alignment of the record should (conservatively) be
set to 1. This is similar to other the other cues we use to determine
that the record has a lower alignment, e.g., that the
externally-supplied layout places fields at lower offsets than we
would. Fixes <rdar://problem/12582052>; test case in LLDB.
llvm-svn: 166824
2012-10-26 22:31:14 +00:00
Fariborz Jahanian
9dd2e0872e
Add comment for my patch in r166809.
...
llvm-svn: 166823
2012-10-26 22:20:25 +00:00
Bill Schmidt
528d2f12b7
This patch is a follow-up to r166805. As suggested on-list, a check was
...
added to ensure no extra alignment code is added in the future.
llvm-svn: 166812
2012-10-26 20:34:52 +00:00
Fariborz Jahanian
5f8d32425d
Remove BLOCK_BYREF_LAYOUT_BYREF flags from list of
...
flags for __block variable meta-data.
llvm-svn: 166811
2012-10-26 20:33:59 +00:00
Fariborz Jahanian
2d26c29e0c
objective-C IRGen: for @implementation nested in
...
extern "C", its method definitions must be IRGen'ed
before meta-data for class is generated. Otherwise,
IRGen crashes (to say the least).
// rdar://12581683
llvm-svn: 166809
2012-10-26 20:22:11 +00:00
Argyrios Kyrtzidis
c2c77c42ef
[driver] Before applying the working directory check if the input path
...
is absolute.
llvm-svn: 166808
2012-10-26 20:09:24 +00:00
Bill Schmidt
4a2dcfe5ee
This patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
...
varargs parameter passing.
A strict reading of the ABI indicates that any argument with alignment greater
than 8 may require skipping doublewords in the parameter save area to align
the argument, and hence require skipping GPRs. In practice, this is not done
by GCC. The alignment restriction is used for internal alignment of a
structure, but a structure with 16-byte alignment, for example, is not
itself 16-byte aligned in the parameter save area. Although this is messy,
it has become the de facto standard used in building existing libraries.
My initial varargs support followed the ABI language, but not the de facto
standard. Running the GCC compatibility test suite exposed this issue, and
indeed showed that LLVM didn't pass parameters self-consistently with my
original logic. Removing the additional alignment logic allows the affected
tests to now pass.
I modified the ppc64-varargs-struct.c test case to remove the existing test
for generation of alignment code, which is no longer appropriate.
Built and tested on powerpc64-unknown-linux-gnu with no new regressions.
llvm-svn: 166805
2012-10-26 19:59:03 +00:00
Argyrios Kyrtzidis
7ec3c09412
[options] Fix mishandling of aliased options that was introduced in r166444.
...
llvm-svn: 166801
2012-10-26 19:36:33 +00:00
Daniel Dunbar
197157613c
tests: Tweak unprintable.c to try another character which is hopefully even more
...
unprintable.
llvm-svn: 166798
2012-10-26 19:15:56 +00:00
Chad Rosier
0130f82ccc
[ms-inline asm] Add test case for r166792.
...
llvm-svn: 166793
2012-10-26 18:33:59 +00:00
Chad Rosier
0473d5429c
[ms-inline asm] Test case for r166790.
...
llvm-svn: 166791
2012-10-26 18:04:45 +00:00
Douglas Gregor
ceb32bf285
Match up anonymous structs/unions in the ASTImporter. Previously, we'd
...
only actually get the answer right if there was only a single
anonymous struct/union at that level. This is part of
<rdar://problem/11904570>; the test will go into LLDB itself.
llvm-svn: 166781
2012-10-26 16:45:11 +00:00
Ted Kremenek
808102685b
Add comments for RemoveRedundantMsgs, rename it to removeRedundantMsgs() per Jordan's feedback.
...
llvm-svn: 166778
2012-10-26 16:02:36 +00:00
Douglas Gregor
3c7380bfba
Eliminate some longstanding FIXMEs regarding variadic templates in the
...
ASTImporter.
llvm-svn: 166777
2012-10-26 15:36:15 +00:00
Douglas Gregor
069bbaf741
In the ASTImporter, don't try to emit a diagnostic if we're not
...
allowed to complain about a failure.
llvm-svn: 166776
2012-10-26 15:34:11 +00:00
Daniel Jasper
89cf9370bf
Remove clang-fixit from tools page as it is currently not planned as a
...
separate tool.
Review: http://llvm-reviews.chandlerc.com/D81
llvm-svn: 166766
2012-10-26 10:25:13 +00:00
David Tweed
89206b6214
These tests require an actual x86 registered target, so mark them as such. Tested on ARM.
...
Patch by Joey Gouly.
llvm-svn: 166765
2012-10-26 10:17:44 +00:00
Bill Wendling
208f61913d
Fix grammar-o.
...
llvm-svn: 166759
2012-10-26 07:02:46 +00:00
Alexey Samsonov
8bece2e957
Fix test suppressed in r166683 on 32-bit Linux
...
llvm-svn: 166758
2012-10-26 07:01:51 +00:00
Fariborz Jahanian
77599ce809
Declare type of flags to be used in a __block (byref)
...
variable descriptor captured by a block.
llvm-svn: 166746
2012-10-26 01:13:38 +00:00
Quentin Colombet
5ee5ca1dbc
Oz optimization level sets ForceSizeOpt attribute for each function
...
llvm-svn: 166744
2012-10-26 00:29:48 +00:00
Manman Ren
5750c1c07e
X86 SSE Intrinsics: update header for sqrt_ss, rsqrt_ss and rcp_ss.
...
There intrinsics pass through the upper FP values from the input.
rdar://12558838
llvm-svn: 166743
2012-10-26 00:25:10 +00:00
Bill Wendling
9d1ee1175d
Recommit Eric's code to validate ASM string's constraints and modifiers.
...
This code checks the ASM string to see if the output size is able to fit within
the variable specified as the output. For instance, scalar-to-vector conversions
may not really work. It's on by default, but can be turned off with a flag if
you think you know what you're doing.
This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm').
<rdar://problem/12284092>
llvm-svn: 166737
2012-10-25 23:28:48 +00:00
Richard Smith
3750e7776b
Fix the other occurrence of the problem fixed by r166731.
...
llvm-svn: 166735
2012-10-25 23:05:00 +00:00
Fariborz Jahanian
a3926ec195
Changing name of enum for block literal flags to represent
...
what it is meant for.
llvm-svn: 166734
2012-10-25 22:55:52 +00:00
Richard Smith
9421156acc
LLVM's hashing routines produce a size_t, and thus generate different values for 32- and 64-bit host compilers. This really needs to be fixed -- the IR generated should not depend on the host -- but this change will get the bots green again. Proper fix to follow.
...
llvm-svn: 166731
2012-10-25 22:27:30 +00:00
Ted Kremenek
a5958869f6
TrackConstraintBRVisitor and ConditionBRVisitor can emit similar
...
path notes for cases where a value may be assumed to be null, etc.
Instead of having redundant diagnostics, do a pass over the generated
PathDiagnostic pieces and remove notes from TrackConstraintBRVisitor
that are already covered by ConditionBRVisitor, whose notes tend
to be better.
Fixes <rdar://problem/12252783>
llvm-svn: 166728
2012-10-25 22:07:10 +00:00
Richard Smith
1048356524
Add a more direct test for r166661.
...
llvm-svn: 166727
2012-10-25 21:59:45 +00:00
Chad Rosier
77c8aca06a
[ms-inline asm] Add a test case for r166723 and r166724.
...
llvm-svn: 166725
2012-10-25 21:52:03 +00:00
Chad Rosier
5c56364be9
[ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.
...
llvm-svn: 166723
2012-10-25 21:49:22 +00:00
Fariborz Jahanian
196f9384c7
Add some new types in preparation of encoding of captured block variable
...
layout meta-data work. wip.
llvm-svn: 166717
2012-10-25 21:15:04 +00:00
Joerg Sonnenberger
ee1f31ebea
Don't require exception handling for clang-tblgen.
...
llvm-svn: 166713
2012-10-25 20:34:00 +00:00
Kaelyn Uhrain
f1ecb7c62c
Move the input files for test/PCH/badpch.c under test/PCH/Inputs/.
...
llvm-svn: 166711
2012-10-25 19:43:57 +00:00
Douglas Gregor
d814a05f6b
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>.
llvm-svn: 166709
2012-10-25 18:39:16 +00:00
Dmitri Gribenko
1c1395e902
Comment to XML conversion: avoid memory allocation while pretty-printing the
...
declaration.
llvm-svn: 166707
2012-10-25 18:28:26 +00:00
Dmitri Gribenko
369ea3cb77
CommentDumper: reorder members and add a comment.
...
llvm-svn: 166705
2012-10-25 18:16:02 +00:00
Fariborz Jahanian
bf7bf29166
Provide comment describing what buildBlockDescriptor does.
...
llvm-svn: 166703
2012-10-25 18:06:53 +00:00
Joerg Sonnenberger
691a16b444
Don't throw exceptions in clang-tblgen by switching to PrintFatalError.
...
Add locations in a number of places, where they are available for free.
llvm-svn: 166691
2012-10-25 16:37:08 +00:00
Micah Villmow
ea2fea2a60
Cleanup some clang code to use new type functions instead of using cast<>.
...
llvm-svn: 166684
2012-10-25 15:39:14 +00:00
NAKAMURA Takumi
920cff606b
clang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due to failing on i686-*-*.
...
llvm-svn: 166683
2012-10-25 14:43:34 +00:00
David Tweed
d8bb236e18
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).
...
llvm-svn: 166681
2012-10-25 13:56:30 +00:00
David Tweed
8f67653d26
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.
llvm-svn: 166679
2012-10-25 13:33:01 +00:00
Alexey Samsonov
9b502e512c
Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.
...
llvm-svn: 166676
2012-10-25 10:18:50 +00:00
NAKAMURA Takumi
95fd41aeac
unittests/ToolingTest.cpp: Suppress newFrontendActionFactory.InjectsEndOfSourceFileCallback on Win32 for now. Investigating.
...
llvm-svn: 166674
2012-10-25 09:38:41 +00:00
Manuel Klimek
8246d87db0
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.
llvm-svn: 166671
2012-10-25 08:49:11 +00:00
Richard Smith
4d3110af06
-fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.
...
llvm-svn: 166661
2012-10-25 02:14:12 +00:00
Argyrios Kyrtzidis
d53d0daab9
Take into account that there may be a BOM at the beginning of the file,
...
when computing the size of the precompiled preamble.
llvm-svn: 166659
2012-10-25 01:51:45 +00:00
Douglas Gregor
79ae600e8f
Update warning-flag test
...
llvm-svn: 166656
2012-10-25 00:34:38 +00:00
Bill Wendling
d75987dde9
Revert r166647 to rethink the patch...
...
llvm-svn: 166655
2012-10-25 00:32:44 +00:00
Douglas Gregor
164df7debd
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.
llvm-svn: 166654
2012-10-25 00:30:23 +00:00
Douglas Gregor
471c1174c2
Fix computation of predefines buffer from the preprocessor-option
...
checking, and disable the old predefines-buffer-diff'ing code path.
llvm-svn: 166653
2012-10-25 00:25:27 +00:00
Eli Friedman
ade609770e
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.
llvm-svn: 166651
2012-10-25 00:12:49 +00:00
Douglas Gregor
d02437c902
ASTUnit doesn't actually care about the predefines; don't record them.
...
llvm-svn: 166650
2012-10-25 00:09:28 +00:00
Douglas Gregor
55358ede64
The the preprocessor option validator to compute suggested
...
predefines. We're not quite ready to cut over to these suggested
predefines yet, however.
llvm-svn: 166648
2012-10-25 00:07:54 +00:00
Bill Wendling
753c8782df
Add some support for diagnosing possibly mismatched constraint, type size and
...
modifiers. (From an idea by Eric...)
<rdar://problem/12284092>
llvm-svn: 166647
2012-10-25 00:05:55 +00:00
Richard Smith
d16fe12e77
'constexpr' and 'friend' are both declaration specifiers. Teach the parser this, for better error recovery.
...
llvm-svn: 166645
2012-10-25 00:00:53 +00:00
Richard Smith
527b15e8f1
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.
llvm-svn: 166644
2012-10-24 23:51:56 +00:00
Douglas Gregor
b636875196
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.
llvm-svn: 166641
2012-10-24 23:41:50 +00:00
NAKAMURA Takumi
4deb9a9b11
c-index-test.c: Split a format string. [-Woverlength-strings]
...
FIXME: They are still long strings without formatter in printf(3)!
llvm-svn: 166636
2012-10-24 22:52:04 +00:00
Chad Rosier
602d09d0aa
[ms-inline asm] Test case for r166632.
...
llvm-svn: 166633
2012-10-24 22:22:12 +00:00
David Blaikie
a9d4a936a8
Fix false positive in -Wunused-variable when a ctor call make involve cleanups.
...
llvm-svn: 166625
2012-10-24 21:29:06 +00:00
Eli Friedman
be20d43232
Update regression tests for r166617.
...
llvm-svn: 166619
2012-10-24 20:28:18 +00:00
Eli Friedman
6fd26424af
Don't print scope qualifiers for references to a type defined locally in a function. Patch by Grzegorz Jablonski.
...
llvm-svn: 166617
2012-10-24 20:21:25 +00:00
Eli Friedman
82dc260385
Add an additional test for namespaces and -Wmissing-variable-declarations. Move C++ test into SemaCXX.
...
llvm-svn: 166616
2012-10-24 20:14:09 +00:00
Douglas Gregor
b6af6c23cd
(De-)serialize the preprocessor options, including macros defined,
...
-include'd files, etc.
llvm-svn: 166614
2012-10-24 20:05:57 +00:00
Rafael Espindola
c9d17591d9
Add a test showing that nodebug is accepted in methods too. Patch by
...
Paul Robinson.
llvm-svn: 166606
2012-10-24 18:34:26 +00:00
Argyrios Kyrtzidis
e26c5571b2
[libclang] Add "-index-file-full" option that recursively indexes any imported
...
modules/PCH files.
llvm-svn: 166605
2012-10-24 18:29:15 +00:00
Douglas Gregor
360d3a5b06
Explicitly specify C++98 when building the C++ precompiled header for this test, so that the test will work on Windows.
...
llvm-svn: 166601
2012-10-24 17:49:01 +00:00
Chad Rosier
340c1ca0f3
[ms-inline asm] Add test cases for r166451.
...
llvm-svn: 166600
2012-10-24 17:48:01 +00:00
Douglas Gregor
1452ff155b
Teach the preprocessor to hold onto the preprocessor options.
...
llvm-svn: 166599
2012-10-24 17:46:57 +00:00
Chad Rosier
42146d9a06
[ms-inline asm] Add test cases for r166592. The test cases only works if the
...
source operand is a register.
llvm-svn: 166594
2012-10-24 17:23:06 +00:00
Douglas Gregor
e81699d938
Move PreprocessorOptions into the Lex library, and make it intrusively
...
reference-counted.
llvm-svn: 166587
2012-10-24 17:01:35 +00:00
Douglas Gregor
2d30236d16
(De-)serialize header search options.
...
llvm-svn: 166586
2012-10-24 16:50:34 +00:00
Douglas Gregor
40ba1a0191
Update unit tests for HeaderSearch change
...
llvm-svn: 166584
2012-10-24 16:24:38 +00:00
Douglas Gregor
b85b9ccb76
Move HeaderSearchOptions into the Lex library, make it intrusively
...
reference-counted, and hold a reference to it in HeaderSearch.
llvm-svn: 166583
2012-10-24 16:19:39 +00:00
Douglas Gregor
5a2783d522
Undef SEMANTIC_VALUE_DIAGOPT appropriately
...
llvm-svn: 166579
2012-10-24 15:53:39 +00:00
Douglas Gregor
c6317dbf5e
(De-)serialize the file system options.
...
llvm-svn: 166577
2012-10-24 15:49:58 +00:00
Douglas Gregor
8263ffb268
Serialize DiagnosticOptions to the AST file.
...
llvm-svn: 166572
2012-10-24 15:17:15 +00:00
Mahesha S
3009374fa4
Removed an extra blank line.
...
llvm-svn: 166571
2012-10-24 15:12:40 +00:00
Manuel Klimek
c268745011
Adds the possibility to run ASTMatchFinder over arbitrary AST nodes.
...
llvm-svn: 166567
2012-10-24 14:47:44 +00:00
Douglas Gregor
2b0a568cdc
Add a simple test involving decltype on Objective-C properties and ivars
...
llvm-svn: 166562
2012-10-24 14:13:21 +00:00
Douglas Gregor
47c089624f
Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.
...
llvm-svn: 166561
2012-10-24 14:11:55 +00:00
Evgeniy Stepanov
04dbc2d022
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.
llvm-svn: 166560
2012-10-24 14:05:29 +00:00
Alexey Samsonov
78d1210f38
Update docs about TSan availability in CMake build
...
llvm-svn: 166558
2012-10-24 13:34:53 +00:00
Alexey Samsonov
2e3c6e2e40
Fix some wordings in AddressSanitizer docs.
...
llvm-svn: 166557
2012-10-24 13:21:51 +00:00
Ulrich Weigand
35668cc401
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.
llvm-svn: 166551
2012-10-24 12:22:56 +00:00
NAKAMURA Takumi
f1f6e99c53
Revert r166541, "clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532."
...
According to r166543, it is not needed for now.
llvm-svn: 166544
2012-10-24 03:59:09 +00:00
Nadav Rotem
dc06b2d39d
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.
llvm-svn: 166543
2012-10-24 03:52:31 +00:00
NAKAMURA Takumi
a22fe582d2
clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532.
...
llvm-svn: 166541
2012-10-24 02:57:57 +00:00
Nico Weber
2643452746
Add a test for -Warc-abi as requested by Fariborz.
...
llvm-svn: 166540
2012-10-24 02:37:03 +00:00
Rafael Espindola
fad28de40c
Add padding inreg registers to cause llvm to skip ecx when needed with
...
the x86_fastcallcc calling convention.
llvm-svn: 166538
2012-10-24 01:59:00 +00:00
Rafael Espindola
077dd59371
Add inreg markers with the x86_fastcallcc calling convention.
...
llvm-svn: 166537
2012-10-24 01:58:58 +00:00
Matt Beaumont-Gay
53e767bf6b
Address feedback from Eli Friedman on r166522.
...
In particular, we do want to warn on some unused cast subexpressions within
macros.
llvm-svn: 166534
2012-10-24 01:14:28 +00:00
Nadav Rotem
ec57ab374b
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
llvm-svn: 166532
2012-10-24 00:53:38 +00:00
Jordan Rose
1bbd143945
[analyzer] Handle 'SomeVar.SomeEnumConstant', which is legal in C++.
...
This caused assertion failures analyzing LLVM.
<rdar://problem/12560282>
llvm-svn: 166529
2012-10-23 23:59:08 +00:00
Jordan Rose
746c06d0bc
[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.
llvm-svn: 166528
2012-10-23 23:59:05 +00:00
Chad Rosier
a96da4773c
[ms-inline asm] Test case for r166526.
...
llvm-svn: 166527
2012-10-23 23:42:25 +00:00
Chad Rosier
03c181b021
[ms-inline asm] Update the triple to test r166523.
...
llvm-svn: 166524
2012-10-23 23:32:21 +00:00
Matt Beaumont-Gay
493d6d55ba
Don't emit -Wunused-value warnings from macro expansions.
...
llvm-svn: 166522
2012-10-23 23:19:32 +00:00
Douglas Gregor
949cc50962
Tweak include order
...
llvm-svn: 166521
2012-10-23 23:13:50 +00:00
Douglas Gregor
7959178eb0
Use a .def file for most of the diagnostic options.
...
llvm-svn: 166520
2012-10-23 23:11:23 +00:00
Fariborz Jahanian
6f5309cf50
Objective-C: check that when a category method is being implemented,
...
method type in cateogry matches the implementation.
// rdar://12519216
llvm-svn: 166518
2012-10-23 23:06:22 +00:00
Douglas Gregor
275e8834c1
Buildbot debugging is fun
...
llvm-svn: 166516
2012-10-23 22:55:10 +00:00
Douglas Gregor
3f7d548a16
One last unit-test fix
...
llvm-svn: 166513
2012-10-23 22:43:37 +00:00
Douglas Gregor
edf8e38701
More unit-test fixes
...
llvm-svn: 166511
2012-10-23 22:38:58 +00:00
Douglas Gregor
cdb4d699a8
Update clang-interpreter example
...
llvm-svn: 166510
2012-10-23 22:36:49 +00:00
Douglas Gregor
d8cfd399fa
Fixup unit tests for DiagnosticOptions change
...
llvm-svn: 166509
2012-10-23 22:31:51 +00:00
Douglas Gregor
811db4eac4
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.
llvm-svn: 166508
2012-10-23 22:26:28 +00:00
Jordan Rose
afaee3c3da
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/.
llvm-svn: 166505
2012-10-23 21:54:03 +00:00
Eli Friedman
9cc8ac523c
Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski.
...
llvm-svn: 166500
2012-10-23 20:26:57 +00:00
Eli Friedman
4e2e13edb7
Delete junk that snuck into r166498.
...
llvm-svn: 166499
2012-10-23 20:23:23 +00:00
Eli Friedman
7d14b3c9b3
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.
llvm-svn: 166498
2012-10-23 20:19:32 +00:00
Douglas Gregor
b0eea8b54b
Switch CodeGenOptions over to a .def file, like we do with LangOptions.
...
llvm-svn: 166497
2012-10-23 20:05:01 +00:00
Richard Smith
40c180db13
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.
llvm-svn: 166496
2012-10-23 19:56:01 +00:00
Chad Rosier
b8097dec8f
[ms-inline asm] Update for r166433.
...
llvm-svn: 166489
2012-10-23 17:44:40 +00:00
Rafael Espindola
1ad26f0423
Handle -pthread, -pg and -shared correctly on bitrig.
...
Patch by David Hill.
llvm-svn: 166483
2012-10-23 17:07:31 +00:00
Sean Silva
d901e82ec4
Fix some mdoc nits
...
Patch by Eitan Adler!
llvm-svn: 166482
2012-10-23 16:35:44 +00:00
Daniel Jasper
b0c7b61730
Make hasDeclaration() matcher work inside the memberExpr() matcher.
...
llvm-svn: 166479
2012-10-23 15:46:39 +00:00
NAKAMURA Takumi
660489c49f
clang/test/PCH/pch-dir.c: Update a comment for msvc. msvc(*-win32) implies -std=c++11.
...
llvm-svn: 166478
2012-10-23 10:43:00 +00:00
Manuel Klimek
7fca93b428
Implements the thisExpr matcher.
...
Patch by Gabor Horvath.
llvm-svn: 166477
2012-10-23 10:40:50 +00:00
NAKAMURA Takumi
500d87159b
clang/test/PCH/pch-dir.c: Mark it as XFAIL:msvc. It doesn't fail (virtually xpass) on msvc.
...
llvm-svn: 166473
2012-10-23 07:47:51 +00:00
NAKAMURA Takumi
0a08aa91d5
clang/test/PCH/pch-dir.c: Relax expressions of path separators for Win32.
...
llvm-svn: 166471
2012-10-23 07:01:50 +00:00
Douglas Gregor
fc9e7a2969
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.
llvm-svn: 166469
2012-10-23 06:18:24 +00:00
Matt Beaumont-Gay
abf836cffa
Fix -Wunused-value to not warn on expressions that have unresolved lookups due
...
to dependent arguments.
llvm-svn: 166468
2012-10-23 06:15:26 +00:00
Argyrios Kyrtzidis
118fafa301
[libclang] Add an environment variable to disable thread background priotity, for testing
...
llvm-svn: 166466
2012-10-23 04:09:38 +00:00
Eli Friedman
d5d136be5b
[ms-inline-asm] Add handling for errors coming out of the backend.
...
llvm-svn: 166463
2012-10-23 02:43:30 +00:00
Rafael Espindola
e2a9e90c88
Don't try to use inreg with 0 sized structs. Thanks to Eli for reporting the
...
regression.
llvm-svn: 166461
2012-10-23 02:04:01 +00:00
Michael J. Spencer
7ccb6d9f8a
[Options] Fix two options I mistransformed.
...
llvm-svn: 166458
2012-10-23 01:25:21 +00:00
Richard Smith
2ddcbab8ff
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!
llvm-svn: 166455
2012-10-23 00:32:41 +00:00
Douglas Gregor
c2d984c823
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.
llvm-svn: 166452
2012-10-22 23:59:45 +00:00
Douglas Gregor
4b29c16eec
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.
llvm-svn: 166449
2012-10-22 23:51:00 +00:00
Douglas Gregor
4750b77ea1
Collapse ASTReader::ReadSLocEntryRecord() into its only caller,
...
ReadSLocEntry(). No functionality change.
llvm-svn: 166447
2012-10-22 22:53:10 +00:00
Douglas Gregor
c9ad5fb604
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.
llvm-svn: 166446
2012-10-22 22:50:17 +00:00
Michael J. Spencer
929fccd476
[Options] Add prefixes to options.
...
Each option has a set of prefixes. When matching an argument such as
-funroll-loops. First the leading - is removed as it is a prefix. Then
a lower_bound search for "funroll-loops" is done against the option table by
option name. From there each option prefix + option name combination is tested
against the argument.
This allows us to support Microsoft style options where both / and - are valid
prefixes. It also simplifies the cases we already have where options come in
both - and -- forms. Almost every option for gnu-ld happens to have this form.
llvm-svn: 166444
2012-10-22 22:13:48 +00:00
NAKAMURA Takumi
395a574ea2
ASTReader.cpp: Fix a warning. [-Wunused-variable]
...
llvm-svn: 166442
2012-10-22 21:50:39 +00:00
Eli Friedman
01e4d5937a
Testcase change for r166440.
...
llvm-svn: 166441
2012-10-22 20:50:45 +00:00
Richard Trieu
da031982b8
Fix for PR13334. This prevents crashes that result from badly formed
...
expressions involving __has_include
llvm-svn: 166438
2012-10-22 20:28:48 +00:00
Chad Rosier
f7000f8c5b
[ms-inline asm] Test case for r166433.
...
llvm-svn: 166434
2012-10-22 19:43:17 +00:00