]> granicus.if.org Git - clang/log
clang
12 years agoFix typo.
Ted Kremenek [Thu, 1 Dec 2011 07:39:23 +0000 (07:39 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145577 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Refactor checkers to use helper function for getting callee Decl and name.
Anna Zaks [Thu, 1 Dec 2011 05:57:37 +0000 (05:57 +0000)]
[analyzer] Refactor checkers to use helper function for getting callee Decl and name.

We are getting name of the called function or it's declaration in a few checkers. Refactor them to use the helper function in the CheckerContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145576 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen analyzing a C++ method (without a specific caller), assume 'this' is non-null...
Ted Kremenek [Thu, 1 Dec 2011 05:29:42 +0000 (05:29 +0000)]
When analyzing a C++ method (without a specific caller), assume 'this' is non-null.  Fixes <rdar://problem/10508787>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145575 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't use a varargs convention for calls unprototyped functions where one of the...
Eli Friedman [Thu, 1 Dec 2011 04:53:19 +0000 (04:53 +0000)]
Don't use a varargs convention for calls unprototyped functions where one of the arguments is an AVX vector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145574 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Create a diagnostic set to pass at the end of indexing.
Argyrios Kyrtzidis [Thu, 1 Dec 2011 02:42:50 +0000 (02:42 +0000)]
[libclang] Create a diagnostic set to pass at the end of indexing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145557 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoInfer the submodule ID for a given declaration based on the location
Douglas Gregor [Thu, 1 Dec 2011 02:07:58 +0000 (02:07 +0000)]
Infer the submodule ID for a given declaration based on the location
of that declaration, and encode the submodule ID in each declaration
stored in an AST file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145555 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen sending a message to a receiver that has "unknown any" type,
Douglas Gregor [Thu, 1 Dec 2011 01:37:36 +0000 (01:37 +0000)]
When sending a message to a receiver that has "unknown any" type,
force the unknown any type to "id" so that the message send can be
completed without requiring a case. Fixes <rdar://problem/10506646>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145552 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoParmVarDecls have no linkage. Previously we would report that parameters
Argyrios Kyrtzidis [Thu, 1 Dec 2011 01:28:21 +0000 (01:28 +0000)]
ParmVarDecls have no linkage. Previously we would report that parameters
in type signatures have external linkage.

Fixes rdar://10058317.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145551 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch the ID numbers used for submodule IDs in the AST reader over to
Douglas Gregor [Thu, 1 Dec 2011 00:59:36 +0000 (00:59 +0000)]
Switch the ID numbers used for submodule IDs in the AST reader over to
a standard global/local scheme, so that submodule definitions will
eventually be able to refer to submodules in other top-level
modules. We'll need this functionality soonish.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145549 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSpecially whitelist the selector 'addOperationWithBlock:' for the retain-cycle checki...
Ted Kremenek [Thu, 1 Dec 2011 00:59:21 +0000 (00:59 +0000)]
Specially whitelist the selector 'addOperationWithBlock:' for the retain-cycle checking in -Warc-retain-cycles.  This commonly
is hit by users using NSOperationQueue.  Fixes <rdar://problem/10465721>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145548 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFurther tweak -Wurneachable-code and templates by allowing the warning to run on
Ted Kremenek [Thu, 1 Dec 2011 00:59:17 +0000 (00:59 +0000)]
Further tweak -Wurneachable-code and templates by allowing the warning to run on
explicit template specializations (which represent actual functions somebody wrote).

Along the way, refactor some other code which similarly cares about whether or
not they are looking at a template instantiation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145547 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix MSVC class layout for empty classes. Patch by Dmitry Sokolov.
Eli Friedman [Thu, 1 Dec 2011 00:37:01 +0000 (00:37 +0000)]
Fix MSVC class layout for empty classes.  Patch by Dmitry Sokolov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145544 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAnother GCC fix
Douglas Gregor [Wed, 30 Nov 2011 23:48:34 +0000 (23:48 +0000)]
Another GCC fix

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145542 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert most of r145372 for now. Lookahead beyond the ';' in a function
Richard Smith [Wed, 30 Nov 2011 23:45:35 +0000 (23:45 +0000)]
Revert most of r145372 for now. Lookahead beyond the ';' in a function
declaration tickles a bug in the way we handle visibility pragmas.

The improvement to error recovery for template function definitions declared
with the 'typedef' specifier in r145372 is unrelated and not reverted here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145541 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUnbreak build with GCC. Clang is too lame to diagnose this particular ill-formedness
Douglas Gregor [Wed, 30 Nov 2011 23:29:56 +0000 (23:29 +0000)]
Unbreak build with GCC. Clang is too lame to diagnose this particular ill-formedness

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145539 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPromote ModuleMap::Module to a namespace-scope class in the Basic
Douglas Gregor [Wed, 30 Nov 2011 23:21:26 +0000 (23:21 +0000)]
Promote ModuleMap::Module to a namespace-scope class in the Basic
library, since modules cut across all of the libraries. Rename
serialization::Module to serialization::ModuleFile to side-step the
annoying naming conflict. Prune a bunch of ModuleMap.h includes that
are no longer needed (most files only needed the Module type).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145538 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[PCH] In ASTReader::FinishedDeserializing, after we do PassInterestingDeclsToConsumer
Argyrios Kyrtzidis [Wed, 30 Nov 2011 23:18:26 +0000 (23:18 +0000)]
[PCH] In ASTReader::FinishedDeserializing, after we do PassInterestingDeclsToConsumer
we may end up having added more pending stuff to do, so go in a loop until everything
is cleared out.

This fixes the error in rdar://10278815 which has a certain David Lynch-esque quality..

  error: unknown type name 'BOOL'; did you mean 'BOOL'?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145536 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTest case for fix committed in r145441.
Lang Hames [Wed, 30 Nov 2011 23:03:25 +0000 (23:03 +0000)]
Test case for fix committed in r145441.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145534 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomake asan work at -O0, clang part. Patch by glider@google.com
Kostya Serebryany [Wed, 30 Nov 2011 22:20:21 +0000 (22:20 +0000)]
make asan work at -O0, clang part. Patch by glider@google.com

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145531 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPer an offline conversation with John McCall, have StmtPrinter actually print out...
Ted Kremenek [Wed, 30 Nov 2011 22:08:08 +0000 (22:08 +0000)]
Per an offline conversation with John McCall, have StmtPrinter actually print out the source expression for OpaqueValueExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145524 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't run -Wunreachable-code on template instantiations. Different instantiations...
Ted Kremenek [Wed, 30 Nov 2011 21:22:09 +0000 (21:22 +0000)]
Don't run -Wunreachable-code on template instantiations.  Different instantiations may produce different unreachable code results, and it is very difficult for us to prove that ALL instantiations of a template have specific unreachable code.  If we come up with a better solution, then we can revisit this, but this approach will at least greatly reduce the noise of this warning for code that makes use of templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145520 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't collide loop variable names (to appease GCC)
Matt Beaumont-Gay [Wed, 30 Nov 2011 19:41:21 +0000 (19:41 +0000)]
Don't collide loop variable names (to appease GCC)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145515 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNote that we'll need to handle __include_macros specially in the module loader
Douglas Gregor [Wed, 30 Nov 2011 19:39:08 +0000 (19:39 +0000)]
Note that we'll need to handle __include_macros specially in the module loader

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145514 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoGet the -march argument based on the target MIPS architecture or cpu and pass
Akira Hatanaka [Wed, 30 Nov 2011 19:31:38 +0000 (19:31 +0000)]
Get the -march argument based on the target MIPS architecture or cpu and pass
it to GNU assembler. In addition, change function getMipsArchFromCPU() so that
it can be reused in ConstructJob().

Patch by Simon Atanasyan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145509 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate CMake build.
Benjamin Kramer [Wed, 30 Nov 2011 18:56:24 +0000 (18:56 +0000)]
Update CMake build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145506 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove the module auto-import logic after the logic that allows a
Douglas Gregor [Wed, 30 Nov 2011 18:12:06 +0000 (18:12 +0000)]
Move the module auto-import logic after the logic that allows a
callback client to suggest an alternative search path and after we
complain when the included file can't be found. The former can't be
tested in isolation, the latter doesn't actually matter (because we
won't make a module suggestion if no header is available). However,
the flow is better this way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145502 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTrivial indentation fix for the code I just committed
Douglas Gregor [Wed, 30 Nov 2011 18:03:26 +0000 (18:03 +0000)]
Trivial indentation fix for the code I just committed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145501 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIntroduce an opt-in warning indicating when the compiler is treating
Douglas Gregor [Wed, 30 Nov 2011 18:02:36 +0000 (18:02 +0000)]
Introduce an opt-in warning indicating when the compiler is treating
an #include/#import as a module import.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145500 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement (de-)serialization of the description of a module and its
Douglas Gregor [Wed, 30 Nov 2011 17:33:56 +0000 (17:33 +0000)]
Implement (de-)serialization of the description of a module and its
submodules. This information will eventually be used for name hiding
when dealing with submodules. For now, we only use it to ensure that
the module "key" returned when loading a module will always be a
module (rather than occasionally being a FileEntry).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145497 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Add checker callback documentation.
Anna Zaks [Wed, 30 Nov 2011 17:12:52 +0000 (17:12 +0000)]
[analyzer] Add checker callback documentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145495 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse raw_ostream::indent.
Benjamin Kramer [Wed, 30 Nov 2011 15:07:30 +0000 (15:07 +0000)]
Use raw_ostream::indent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145492 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch the module map printer over to
Douglas Gregor [Wed, 30 Nov 2011 15:00:49 +0000 (15:00 +0000)]
Switch the module map printer over to
raw_ostream::write_escaped. Thanks, Benjamin!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145491 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd preprocessor-only test for submodule imports
Douglas Gregor [Wed, 30 Nov 2011 14:57:39 +0000 (14:57 +0000)]
Add preprocessor-only test for submodule imports

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145490 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix the instantiation of pseudo-object expressions. This is a
John McCall [Wed, 30 Nov 2011 04:42:31 +0000 (04:42 +0000)]
Fix the instantiation of pseudo-object expressions.  This is a
really bad way to go about this, but I'm not sure there's a better
choice without substantial changes to TreeTransform --- most
notably, preserving implicit semantic nodes instead of discarding
and rebuilding them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145480 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen writing a module file, pass the module through to the AST
Douglas Gregor [Wed, 30 Nov 2011 04:39:39 +0000 (04:39 +0000)]
When writing a module file, pass the module through to the AST
writer. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145479 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach the preprocessor how to handle module import declarations that
Douglas Gregor [Wed, 30 Nov 2011 04:26:53 +0000 (04:26 +0000)]
Teach the preprocessor how to handle module import declarations that
involve submodules (e.g., importing std.vector), rather than always
importing the top-level module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145478 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen loading a module that involves submodules (e.g., std.vector),
Douglas Gregor [Wed, 30 Nov 2011 04:03:44 +0000 (04:03 +0000)]
When loading a module that involves submodules (e.g., std.vector),
check whether the named submodules themselves are actually
valid, and drill down to the named submodule (although we don't do
anything with it yet). Perform typo correction on the submodule names
when possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145477 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd bigger method type encodings to protocol objects. <rdar://problem/10492418>
Bob Wilson [Wed, 30 Nov 2011 01:57:58 +0000 (01:57 +0000)]
Add bigger method type encodings to protocol objects.  <rdar://problem/10492418>

The new metadata are method @encode strings with additional data.

1. Each Objective-C object is marked with its class name and protocol names.
The same is done for property @encode already.

2. Each block object is marked with its function prototype's @encoding. For
example, a method parameter that is a block object that itself returns void
and takes an int would look like:
    @?<v@?i>

These new method @encode strings are stored in a single array pointed to by structs protocol_t and objc_protocol_ext.

Patch provided by Greg Parker!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145469 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agowhen -faddress-sanitizer is present, add required flags to the linker command (linux...
Kostya Serebryany [Wed, 30 Nov 2011 01:39:16 +0000 (01:39 +0000)]
when -faddress-sanitizer is present, add required flags to the linker command (linux-only)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145467 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch the module-loading interfaces and parser from a simple
Douglas Gregor [Wed, 30 Nov 2011 00:36:36 +0000 (00:36 +0000)]
Switch the module-loading interfaces and parser from a simple
top-level module name to a module path (e.g., std.vector). We're still
missing a number of pieces for this actually to do something.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145462 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake sure that forward declarations are marked as such in the debug info
Eric Christopher [Tue, 29 Nov 2011 23:57:40 +0000 (23:57 +0000)]
Make sure that forward declarations are marked as such in the debug info
for the structure type.

rdar://10499337

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145461 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Do the ConcurrencyCheck at the beginning of clang_findReferencesInFile.
Argyrios Kyrtzidis [Tue, 29 Nov 2011 23:21:50 +0000 (23:21 +0000)]
[libclang] Do the ConcurrencyCheck at the beginning of clang_findReferencesInFile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145455 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange processor names. Patch by Simon Atanasyan.
Akira Hatanaka [Tue, 29 Nov 2011 23:09:24 +0000 (23:09 +0000)]
Change processor names. Patch by Simon Atanasyan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145453 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert r145244. It causes us to create broken ASTs with missing type information
Richard Smith [Tue, 29 Nov 2011 22:48:16 +0000 (22:48 +0000)]
Revert r145244. It causes us to create broken ASTs with missing type information
for some cast expressions.

Original commit message:

Removed useless ImplicitCast nodes in explicit cstyle and static casts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145447 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSuppress -Warray-bounds for classes (not just structs) where the last field is
Matt Beaumont-Gay [Tue, 29 Nov 2011 22:43:53 +0000 (22:43 +0000)]
Suppress -Warray-bounds for classes (not just structs) where the last field is
a 1-length character array.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145445 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoEliminate the -emit-module option, which emitted a module by parsing a
Douglas Gregor [Tue, 29 Nov 2011 22:42:06 +0000 (22:42 +0000)]
Eliminate the -emit-module option, which emitted a module by parsing a
source file (e.g., a header). Immediately steal this useful option
name for building modules from a module map file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145444 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTest isa<FunctionDecl> to exclude objective-C methods. This ensures the following...
Lang Hames [Tue, 29 Nov 2011 22:37:13 +0000 (22:37 +0000)]
Test isa<FunctionDecl> to exclude objective-C methods. This ensures the following cast will never fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145441 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoEscape strings when printing module maps, for silly operating systems
Douglas Gregor [Tue, 29 Nov 2011 22:27:12 +0000 (22:27 +0000)]
Escape strings when printing module maps, for silly operating systems
that use \ as a separator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145439 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch on-demand module building over to use module maps, always. When
Douglas Gregor [Tue, 29 Nov 2011 21:59:16 +0000 (21:59 +0000)]
Switch on-demand module building over to use module maps, always. When
we infer the module map, we'll just print the module map to a
temporary file and generate the module using that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145436 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRelax RegionStore to allow loads from CodeTextRegions. Apparently you can actually...
Ted Kremenek [Tue, 29 Nov 2011 19:39:29 +0000 (19:39 +0000)]
Relax RegionStore to allow loads from CodeTextRegions.  Apparently you can actually write code that does this.  This seems worthy of a checker, but the StoreManager should handle the memory abstraction without crashing.  Fixes PR 11450.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145424 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMerge branch 'yo-dawg-i-herd-u-like-arrays'
Matt Beaumont-Gay [Tue, 29 Nov 2011 19:27:11 +0000 (19:27 +0000)]
Merge branch 'yo-dawg-i-herd-u-like-arrays'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145421 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPlace "use @dynamic or provide a method implementation" warnings under a -W flag.
Ted Kremenek [Tue, 29 Nov 2011 19:18:47 +0000 (19:18 +0000)]
Place "use @dynamic or provide a method implementation" warnings under a -W flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145418 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach the module import mechanism how to rebuild modules expressed via
Douglas Gregor [Tue, 29 Nov 2011 19:06:37 +0000 (19:06 +0000)]
Teach the module import mechanism how to rebuild modules expressed via
module map, rather than assuming that there is an umbrella
header. This allows us to automatically build umbrella-less modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145415 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoStart refactoring to use module maps when rebuilding a module
Douglas Gregor [Tue, 29 Nov 2011 18:31:39 +0000 (18:31 +0000)]
Start refactoring to use module maps when rebuilding a module
on-the-fly. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145414 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoInitialize NumWarningsInPreamble in ASTUnit's constructor, for safety.
Argyrios Kyrtzidis [Tue, 29 Nov 2011 18:18:33 +0000 (18:18 +0000)]
Initialize NumWarningsInPreamble in ASTUnit's constructor, for safety.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145412 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExpose the printing of module maps as part of the ModuleMap::Module
Douglas Gregor [Tue, 29 Nov 2011 18:17:59 +0000 (18:17 +0000)]
Expose the printing of module maps as part of the ModuleMap::Module
interface. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145411 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThe cheap version of getName() is sufficient here.
Benjamin Kramer [Tue, 29 Nov 2011 14:46:55 +0000 (14:46 +0000)]
The cheap version of getName() is sufficient here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145399 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPreserve constness.
Benjamin Kramer [Tue, 29 Nov 2011 12:31:20 +0000 (12:31 +0000)]
Preserve constness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145397 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSilence GCC warnings, RefCountedBase is meant to be default-initialized here.
Benjamin Kramer [Tue, 29 Nov 2011 11:31:35 +0000 (11:31 +0000)]
Silence GCC warnings, RefCountedBase is meant to be default-initialized here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145396 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd fix-it to remove 'typedef' from function template definitions. Such a token
Richard Smith [Tue, 29 Nov 2011 09:09:06 +0000 (09:09 +0000)]
Add fix-it to remove 'typedef' from function template definitions. Such a token
was probably meant to be 'typename', which we will have already suggested if it
is appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145395 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix leaking of LexedMethod objects created for caching objc method definitions tokens
Argyrios Kyrtzidis [Tue, 29 Nov 2011 08:14:54 +0000 (08:14 +0000)]
Fix leaking of LexedMethod objects created for caching objc method definitions tokens
for late parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145394 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Fix leak in clang_indexSourceFile_Impl
Argyrios Kyrtzidis [Tue, 29 Nov 2011 08:14:50 +0000 (08:14 +0000)]
[libclang] Fix leak in clang_indexSourceFile_Impl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145393 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[Win32] Catch exceptions (eg. segfault) on waiting for invoked clang from the driver.
NAKAMURA Takumi [Tue, 29 Nov 2011 07:47:04 +0000 (07:47 +0000)]
[Win32] Catch exceptions (eg. segfault) on waiting for invoked clang from the driver.

clang/lib/Driver/Driver.cpp: Don't pass through negative exit status, or parent would be confused.

llvm::sys::Program::Wait(): Suppose 0x8000XXXX and 0xC000XXXX as abnormal exit code and pass it as negative value.

Win32 Exception Handler: Exit with ExceptionCode on an unhandle exception.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145389 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Make the test portable.
Argyrios Kyrtzidis [Tue, 29 Nov 2011 05:48:01 +0000 (05:48 +0000)]
[libclang] Make the test portable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145377 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR10101: Recover better from a common copy-paste error: if a function
Richard Smith [Tue, 29 Nov 2011 05:27:40 +0000 (05:27 +0000)]
PR10101: Recover better from a common copy-paste error: if a function
declaration at namespace scope is followed by a semicolon and an open-brace
(or in C++, a 'try', ':' or '='), then the error is probably a function
definition with a spurious ';', rather than a mysterious '{'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145372 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Make clang_findReferencesInFile also work on macros (find all expansions...
Argyrios Kyrtzidis [Tue, 29 Nov 2011 03:14:11 +0000 (03:14 +0000)]
[libclang] Make clang_findReferencesInFile also work on macros (find all expansions/definition
of a macro in a file).

As a bonus, also make searching for declarations more efficient by ignoring
preprocessing entities when we know that we are looking for a declaration.

Fixes rdar://10427411.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145369 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd Clang release notes for OpenCL C support.
Peter Collingbourne [Tue, 29 Nov 2011 02:03:07 +0000 (02:03 +0000)]
Add Clang release notes for OpenCL C support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145360 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix URL typo.
Peter Collingbourne [Tue, 29 Nov 2011 02:03:03 +0000 (02:03 +0000)]
Fix URL typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145359 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc: warn if NSObject attribute appears other than in a typedef.
Fariborz Jahanian [Tue, 29 Nov 2011 01:48:40 +0000 (01:48 +0000)]
objc: warn if NSObject attribute appears other than in a typedef.
// rdar://10453342

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145358 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix serialized diagnostics to handle FixIts that only remove text. Fixes <rdar:...
Ted Kremenek [Tue, 29 Nov 2011 00:30:52 +0000 (00:30 +0000)]
Fix serialized diagnostics to handle FixIts that only remove text.  Fixes <rdar://problem/10473903>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145339 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a spelling error pointed out by Sebastien, and tidy up the
Chandler Carruth [Tue, 29 Nov 2011 00:24:20 +0000 (00:24 +0000)]
Fix a spelling error pointed out by Sebastien, and tidy up the
formatting here a bit... mostly to my preferred bikeshed-blue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145337 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove the last of my notes. I don't think these really need to be in
Chandler Carruth [Tue, 29 Nov 2011 00:24:18 +0000 (00:24 +0000)]
Remove the last of my notes. I don't think these really need to be in
the release notes despite their awesomeness. If we had a thorough
discussion of the performance of Clang in 2.9 vs. 3.0, the first would
be more relevant, but we don't. The serialization stuff hopefully isn't
terribly visible to end users.

Objections to these omissions are of course welcome. =]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145336 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLast major chunk of features. This covers a couple of language
Chandler Carruth [Tue, 29 Nov 2011 00:15:26 +0000 (00:15 +0000)]
Last major chunk of features. This covers a couple of language
extensions and one infrastructure feature addition that has a direct
impact on other projects which use Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145335 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAnd sink the GNU runtime bit into this section as a stub.
Chandler Carruth [Tue, 29 Nov 2011 00:15:25 +0000 (00:15 +0000)]
And sink the GNU runtime bit into this section as a stub.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145334 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFlesh out the Objective-C section a bit. This may well need some love
Chandler Carruth [Tue, 29 Nov 2011 00:15:23 +0000 (00:15 +0000)]
Flesh out the Objective-C section a bit. This may well need some love
from the Objective-C experts, but the basic stuff is there now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145333 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThe _setjmp builtin library function should have the "returns twice"
Bill Wendling [Tue, 29 Nov 2011 00:10:10 +0000 (00:10 +0000)]
The _setjmp builtin library function should have the "returns twice"
attribute. This prevents the stack slot allocator from coming along and using a
stack which it thinks is available but isn't.
<rdar://problem/10492556>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145332 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a couple more GCC versions to C++ search paths for MinGW. Patch by Ruben Van...
Eli Friedman [Mon, 28 Nov 2011 23:58:55 +0000 (23:58 +0000)]
Add a couple more GCC versions to C++ search paths for MinGW.  Patch by Ruben Van Boxem.

(We should probably start doing some sort of autodetection like we do on Linux at some point.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145326 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCFI is mentioned on the LLVM releases as the clang bits are relatively small.
Rafael Espindola [Mon, 28 Nov 2011 23:58:04 +0000 (23:58 +0000)]
CFI is mentioned on the LLVM releases as the clang bits are relatively small.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145325 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoA couple driver fixes for PPC Linux. Patches by Michael Kostylev. PR11444/PR11445.
Eli Friedman [Mon, 28 Nov 2011 23:46:52 +0000 (23:46 +0000)]
A couple driver fixes for PPC Linux.  Patches by Michael Kostylev.  PR11444/PR11445.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145321 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate release notes with 2 features now supported in -fms-extensions mode.
Francois Pichet [Mon, 28 Nov 2011 23:46:15 +0000 (23:46 +0000)]
Update release notes with 2 features now supported in -fms-extensions mode.
I think that's enough for my release notes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145320 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRelease notes: add link to ISO C++ 2011 standard from the C++11 section.
Richard Smith [Mon, 28 Nov 2011 23:35:03 +0000 (23:35 +0000)]
Release notes: add link to ISO C++ 2011 standard from the C++11 section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145317 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate release notes with information on MSVC mode.
Francois Pichet [Mon, 28 Nov 2011 23:30:46 +0000 (23:30 +0000)]
Update release notes with information on MSVC mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145315 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCorrect the code generation for function arguments of vec3 types on x86_64 when they...
Tanya Lattner [Mon, 28 Nov 2011 23:18:11 +0000 (23:18 +0000)]
Correct the code generation for function arguments of vec3 types on x86_64 when they are greater than 128 bits. This was incorrectly coercing things like long3 into a double2.
Add test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145312 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRelease notes: fix up formatting of diagnostic example.
Richard Smith [Mon, 28 Nov 2011 23:16:15 +0000 (23:16 +0000)]
Release notes: fix up formatting of diagnostic example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145311 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen attempting to load a module that is not in the module cache,
Douglas Gregor [Mon, 28 Nov 2011 23:16:06 +0000 (23:16 +0000)]
When attempting to load a module that is not in the module cache,
return the module itself (in the module map) rather than returning the
umbrella header used to build the module. While doing this, make sure
that we're inferring modules for frameworks to build that module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145310 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExtract a Windows section in the release notes. Hopefully this is more
Chandler Carruth [Mon, 28 Nov 2011 23:11:27 +0000 (23:11 +0000)]
Extract a Windows section in the release notes. Hopefully this is more
accurate than my original notes were based on IRC conversations. Windows
folks, please edit as needed to make this closer to the truth if I've
still got it wrong.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145309 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCreate a stub for Nick to hack on, nuking another of my rough notes.
Chandler Carruth [Mon, 28 Nov 2011 23:02:13 +0000 (23:02 +0000)]
Create a stub for Nick to hack on, nuking another of my rough notes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145308 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPull the uninitialized values rewrite into the diagnostics section, and
Chandler Carruth [Mon, 28 Nov 2011 22:54:33 +0000 (22:54 +0000)]
Pull the uninitialized values rewrite into the diagnostics section, and
add a bit to that section about the many bug-finding warnings that Clang
has grown since 2.9 as this is one of the more visible new additions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145307 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove some features that don't really seem major enough or widely used
Chandler Carruth [Mon, 28 Nov 2011 22:54:31 +0000 (22:54 +0000)]
Remove some features that don't really seem major enough or widely used
enough to merit space in the release notes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145306 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a release notes section for C1X language features supported by clang 3.0.
Richard Smith [Mon, 28 Nov 2011 22:48:25 +0000 (22:48 +0000)]
Add a release notes section for C1X language features supported by clang 3.0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145305 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPull out the libclang section and try to clean it up some. This one
Chandler Carruth [Mon, 28 Nov 2011 22:43:32 +0000 (22:43 +0000)]
Pull out the libclang section and try to clean it up some. This one
feels a bit spartan currently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145302 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Protect against the declaration's SourceRange being invalid
Argyrios Kyrtzidis [Mon, 28 Nov 2011 22:38:07 +0000 (22:38 +0000)]
[libclang] Protect against the declaration's SourceRange being invalid
before passing to RangeCompare.

Though no idea how this can occur with the decls returned from
findFileRegionDecls().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145301 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWe now have text (or comment stubs for others) for these...
Chandler Carruth [Mon, 28 Nov 2011 22:36:40 +0000 (22:36 +0000)]
We now have text (or comment stubs for others) for these...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145299 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExpand and clean up the diagnostics section.
Chandler Carruth [Mon, 28 Nov 2011 22:34:59 +0000 (22:34 +0000)]
Expand and clean up the diagnostics section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145298 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agofix html markup
Kostya Serebryany [Mon, 28 Nov 2011 22:34:10 +0000 (22:34 +0000)]
fix html markup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145297 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix some possible gcc-4.2 may be used uninitialized warnings.
Daniel Dunbar [Mon, 28 Nov 2011 22:19:36 +0000 (22:19 +0000)]
Fix some possible gcc-4.2 may be used uninitialized warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145293 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCreate a more organized (but still commented out as not very useful)
Chandler Carruth [Mon, 28 Nov 2011 22:17:58 +0000 (22:17 +0000)]
Create a more organized (but still commented out as not very useful)
stub for OpenCL work. I can't really dig enough out of the commit log
messages other than to tell that a lot of work went into this in the 2.9
-> 3.0 timeframe. I'll let the folks touching it decide if it merits
a spot in the release notes and provide the appropriate details if so.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145291 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd missing equals.
Benjamin Kramer [Mon, 28 Nov 2011 22:17:09 +0000 (22:17 +0000)]
Add missing equals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145290 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCreate a 3.1 notes section in a comment so that the next batch are a bit
Chandler Carruth [Mon, 28 Nov 2011 22:12:44 +0000 (22:12 +0000)]
Create a 3.1 notes section in a comment so that the next batch are a bit
easier. Move the CUDA bits and the C1X/C++11 atomics stuff there. We
haven't exposed a __has_feature for the atomic builtins, so none of this
is available yet...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145288 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPeter says this shouldn't make it to the relnotes, it's too immature at
Chandler Carruth [Mon, 28 Nov 2011 22:06:59 +0000 (22:06 +0000)]
Peter says this shouldn't make it to the relnotes, it's too immature at
this stage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145286 91177308-0d34-0410-b5e6-96231b3b80d8