David Blaikie
4f1f9e6b2e
Fix typo (becuase->because), PR11427
...
llvm-svn: 145117
2011-11-24 00:37:54 +00:00
Matt Beaumont-Gay
63be19122e
Wordsmith the -Warray-bounds diagnostic text a bit
...
llvm-svn: 145116
2011-11-24 00:27:38 +00:00
Richard Trieu
caff247882
Add feature to diagnostics that will provide more information on function
...
pointer mismatch. Cases covered are: initialization, assignment, and function
arguments. Additional text will give the extra information about the nature
of the mismatch: different classes for member functions, wrong number of
parameters, different parameter type, different return type, and function
qualifier mismatch.
llvm-svn: 145114
2011-11-23 22:32:32 +00:00
Argyrios Kyrtzidis
a72450057b
[PCH] Check for isTopLevelDeclInObjCContainer when picking abbreviations.
...
llvm-svn: 145110
2011-11-23 21:11:23 +00:00
Argyrios Kyrtzidis
8ad3bab505
[libclang] Fix operations (token annotation, getting cursor, etc.) with a file region
...
inside an objc container that "contains" other file-level declarations.
When getting the array of file-level declarations that overlap with a file region,
we failed to report that the region overlaps with an objc container, if
the container had other file-level declarations declared lexically inside it.
Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST
and handling them appropriately.
llvm-svn: 145109
2011-11-23 20:27:36 +00:00
Argyrios Kyrtzidis
e4d082827d
Remove an assertion that is not valid if we cancel parsing.
...
llvm-svn: 145108
2011-11-23 20:27:29 +00:00
Argyrios Kyrtzidis
41fc05cad8
[libclang] Indexing API: Fix issues, mostly C++ related.
...
llvm-svn: 145107
2011-11-23 20:27:26 +00:00
James Molloy
c445be4b4b
AAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and aapcs-linux.
...
Original behaviour of defining wchar_t as signed int has been kept for apcs-gnu as I don't have any spec for this to validate against.
llvm-svn: 145102
2011-11-23 13:35:08 +00:00
Richard Smith
514f7e9cb9
Don't check alignment, it's irrelevant to this test.
...
llvm-svn: 145093
2011-11-23 02:12:00 +00:00
Richard Smith
2d988f0f05
Use static storage duration for file-scope compound literals, even when they
...
appear in non-constant initializers in C++.
llvm-svn: 145087
2011-11-22 22:48:32 +00:00
Benjamin Kramer
900f1defdd
Remove assert from hot code path and add a clarifying comment.
...
The assert wasn't adding much value but slowed down Release+Asserts builds.
llvm-svn: 145082
2011-11-22 20:39:31 +00:00
Matt Beaumont-Gay
31fcb9f291
Provide better source info for template specializations with non-type arguments.
...
This fixes a crasher in tools like Include-What-You-Use which examine such
arguments. Patch from Dean Sturtevant at Google!
llvm-svn: 145077
2011-11-22 20:00:10 +00:00
Benjamin Kramer
3885737a1b
Lexer: Don't throw away the hard work SSE did to find a slash.
...
We can reuse the information and avoid looping over all the bytes again.
llvm-svn: 145070
2011-11-22 18:56:46 +00:00
Argyrios Kyrtzidis
4c910b1475
[libclang] Indexing API: Support C++ symbols.
...
llvm-svn: 145058
2011-11-22 07:24:51 +00:00
Kostya Serebryany
c3333e879f
implement __has_feature(address_sanitizer); also use LangOpts.AddressSanitizer instead of CodeGenOpts.AddressSanitizer
...
llvm-svn: 145054
2011-11-22 01:28:36 +00:00
Peter Collingbourne
6e6e52b58a
Un-XFAIL this test on Darwin, it reportedly passes now.
...
llvm-svn: 145052
2011-11-21 21:56:51 +00:00
Richard Smith
f13b855809
Add stub section to the user manual for C++ language features, and document
...
-ftemplate-depth= and -fconstexpr-depth= in it.
llvm-svn: 145049
2011-11-21 20:54:59 +00:00
Richard Smith
9a56882e53
Add driver arguments -ftemplate-depth=N and -fconstexpr-depth=N, with the same
...
semantics and defaults as the corresponding g++ arguments. The historical g++
argument -ftemplate-depth-N is kept for compatibility, but modern g++ versions
no longer document that option.
Add -cc1 argument -fconstexpr-depth N to implement the corresponding
functionality.
The -ftemplate-depth=N part of this fixes PR9890.
llvm-svn: 145045
2011-11-21 19:36:32 +00:00
Roman Divacky
d150ad3f07
Change the linker emulation name for FreeBSD/PPC32.
...
Submitted by Andreas Tobler!
llvm-svn: 145041
2011-11-21 16:50:32 +00:00
Benjamin Kramer
5642e19065
CodeGen: Simplify code.
...
llvm-svn: 145040
2011-11-21 15:47:23 +00:00
Peter Collingbourne
0e7e3fc130
Delete the depfile if we could not open a header file. We cannot
...
generate any reasonable depfile if a header is missing.
llvm-svn: 145019
2011-11-21 00:01:14 +00:00
Peter Collingbourne
119cfaa595
Teach the driver about failure result files, which are compilation
...
output files that are valid regardless of whether the compilation
succeeded or failed (but not if we crash). Add depfiles to the
failure result file list.
llvm-svn: 145018
2011-11-21 00:01:05 +00:00
Peter Collingbourne
17a7bbbc9f
Create the clang++ symlink as a POST_BUILD custom command on clang.
...
This saves us from re-creating the symlink on every build even if we
didn't rebuild clang.
llvm-svn: 145017
2011-11-21 00:00:48 +00:00
Benjamin Kramer
ddbb2b85ab
CodeGen: allow __asm renaming on static local variables.
...
Fixes PR4777.
llvm-svn: 145015
2011-11-20 21:05:04 +00:00
Douglas Gregor
8ad31c2e36
Allow preprocessor callbacks to recover from a "file not found" error,
...
from Jason Haslam!
llvm-svn: 145012
2011-11-20 17:46:46 +00:00
Douglas Gregor
49ccfaa938
Add support for pretty-printing attributes, from Richard Membarth!
...
llvm-svn: 145002
2011-11-19 19:22:57 +00:00
Douglas Gregor
9f39a765e2
Update signature of HandleTopLevelDecl.
...
llvm-svn: 145001
2011-11-19 19:22:13 +00:00
Douglas Gregor
328d8d255e
Tweak the guidelines for when one should send patches to cfe-commits vs. cfe-dev
...
llvm-svn: 145000
2011-11-19 19:14:26 +00:00
Abramo Bagnara
5001caa1b6
Fixed HadMultipleCandidates loading.
...
llvm-svn: 144995
2011-11-19 11:44:21 +00:00
Benjamin Kramer
7824360017
Driver: Remove the signal number from the "command failed" diagnostic.
...
- With the current implementation of sys::Program this always printed "2".
- The command execution code will output the right number anyway (including the signal name).
llvm-svn: 144993
2011-11-19 10:24:49 +00:00
Douglas Gregor
6cdda3bde6
Initialize ImplicitConversionSequence::ListInitializationSequence. Fixes PR11394
...
llvm-svn: 144992
2011-11-19 09:56:57 +00:00
Douglas Gregor
3005bfd516
Add missing initialization in the ContentCache. Seriously, when do
...
constructors go below public member functions?
llvm-svn: 144991
2011-11-19 09:42:42 +00:00
Francois Pichet
6dc4c16417
Enable delayed template parsing for friend functions declared at template class scope.
...
llvm-svn: 144980
2011-11-18 23:47:17 +00:00
Abramo Bagnara
12dcbf3eaa
Fixed implicit instantiations source range.
...
llvm-svn: 144977
2011-11-18 08:08:52 +00:00
Ted Kremenek
2acedbd417
Refine placement of LangOptions object in CompilerInvocation by adding a new baseclass CompilerInvocationBase with a custom copy constructor. This ensures that whenever the CompilerInvocation object's copy constructor is used we always clone the LangOptions object.
...
llvm-svn: 144973
2011-11-18 04:32:13 +00:00
Eli Friedman
f22fa9eaef
Finish r144971, which was an incomplete commit.
...
llvm-svn: 144972
2011-11-18 04:01:36 +00:00
Eli Friedman
0b3f201b61
Fix the meaning of an "empty" record for the case of a zero-length array. Use isEmptyRecord for arguments on x86-32; there are structs of size 0 which don't count as empty.
...
llvm-svn: 144971
2011-11-18 03:47:20 +00:00
Eli Friedman
a1748564b4
Make va_arg on x86-64 compute alignment the same way as argument passing.
...
Fixes <rdar://problem/10463281>.
llvm-svn: 144966
2011-11-18 02:44:19 +00:00
Anna Zaks
457c68726c
[analyzer] Warn when non pointer arguments are passed to scanf (only when running taint checker).
...
There is an open radar to implement better scanf checking as a Sema warning. However, a bit of redundancy is fine in this case.
llvm-svn: 144964
2011-11-18 02:26:36 +00:00
Eli Friedman
1d7dd3b682
A bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures containing an SSE vector.
...
llvm-svn: 144963
2011-11-18 02:12:09 +00:00
Eli Friedman
e5c85622c9
Don't try to expand struct arguments containing holes on x86-32. From gcc struct layout tests.
...
llvm-svn: 144961
2011-11-18 01:32:26 +00:00
Eli Friedman
ee94534662
Simplify code for returning a struct for Darwin x86-32 ABI. Use a better type for a function returning a struct containing only a pointer. Handle the edge case of a struct containing only a float or double plus some dead padding instead of asserting.
...
llvm-svn: 144960
2011-11-18 01:25:50 +00:00
NAKAMURA Takumi
2a4859aeff
c-index-test.c: Fix syntax according to C.
...
llvm-svn: 144947
2011-11-18 00:51:03 +00:00
Anna Zaks
1df54a8bc8
[analyzer] The compiler warning was disabling the analyzer in this test.
...
llvm-svn: 144946
2011-11-18 00:45:20 +00:00
Eli Friedman
9f061a37bb
Ignore empty unions in argument lowering on x86-32. From gcc struct layout tests.
...
llvm-svn: 144944
2011-11-18 00:28:11 +00:00
Argyrios Kyrtzidis
841dd8861a
Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continue
...
parsing or false to abort parsing.
llvm-svn: 144943
2011-11-18 00:26:59 +00:00
Argyrios Kyrtzidis
effdbf55ac
[libclang] Indexing API:
...
-For indexDeclaration, also pass the declaration attributes as an array of cursors.
-Rename CXIndexOpt_OneRefPerFile -> CXIndexOpt_SuppressRedundantRefs, and only pass
a reference if a declaration/definition does not exist in the file.
-Other fixes.
llvm-svn: 144942
2011-11-18 00:26:51 +00:00
Argyrios Kyrtzidis
1cff795e51
[libclang] Indexing API: make sure we don't pass declarations/references without USR or location.
...
llvm-svn: 144941
2011-11-18 00:26:46 +00:00
Eric Christopher
459532e1d5
Use the canonical decl to index so that we can really find it later.
...
Fixes rdar://10433202
llvm-svn: 144938
2011-11-17 23:45:00 +00:00
Sean Callanan
651982790a
Added a clause to the ASTImporter allowing it to
...
import TranslationUnitDecls.
llvm-svn: 144934
2011-11-17 23:20:56 +00:00