]> granicus.if.org Git - clang/log
clang
12 years ago[analyzer] isCLibraryFunction: check that the function is at TU-scope.
Jordan Rose [Fri, 2 Nov 2012 23:49:24 +0000 (23:49 +0000)]
[analyzer] isCLibraryFunction: check that the function is at TU-scope.

Also, Decls already carry a pointer to the ASTContext, so there's no need
to pass an extra argument to the predicate.

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

12 years agoEmit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class...
David Blaikie [Fri, 2 Nov 2012 23:40:00 +0000 (23:40 +0000)]
Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class_type).

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

12 years agoAvoid version skew by making ObjC strict metadata tests resilient to new field.
David Blaikie [Fri, 2 Nov 2012 23:07:41 +0000 (23:07 +0000)]
Avoid version skew by making ObjC strict metadata tests resilient to new field.

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

12 years agoobjective-C mrr block. Block variable layout metadata in
Fariborz Jahanian [Fri, 2 Nov 2012 22:51:18 +0000 (22:51 +0000)]
objective-C mrr block. Block variable layout metadata in
mrr mode.

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

12 years agoWhen code-completing don't disable the preprocessing record if modules are enabled.
Argyrios Kyrtzidis [Fri, 2 Nov 2012 22:18:44 +0000 (22:18 +0000)]
When code-completing don't disable the preprocessing record if modules are enabled.

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

12 years agoThread safety analysis: Fixed ICE caused by double delete when late parsed
DeLesley Hutchins [Fri, 2 Nov 2012 21:44:32 +0000 (21:44 +0000)]
Thread safety analysis: Fixed ICE caused by double delete when late parsed
attributes are attached to function declarations nested inside a class method.

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

12 years agoFix test cases I broken when fixing grammar in diagnostic message.
Richard Trieu [Fri, 2 Nov 2012 21:41:42 +0000 (21:41 +0000)]
Fix test cases I broken when fixing grammar in diagnostic message.

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

12 years agoFix grammar of diagnostic message.
Richard Trieu [Fri, 2 Nov 2012 21:33:17 +0000 (21:33 +0000)]
Fix grammar of diagnostic message.

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

12 years ago[analyzer] Test SimpleStream on the buildbot.
Anna Zaks [Fri, 2 Nov 2012 21:30:07 +0000 (21:30 +0000)]
[analyzer] Test SimpleStream on the buildbot.

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

12 years ago[analyzer] Factor SimpleStreamChecker pulling out isLeaked().
Anna Zaks [Fri, 2 Nov 2012 21:30:04 +0000 (21:30 +0000)]
[analyzer] Factor SimpleStreamChecker pulling out isLeaked().

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

12 years agoFix debug tag type of forward declarations of struct/class in C++.
David Blaikie [Fri, 2 Nov 2012 20:49:01 +0000 (20:49 +0000)]
Fix debug tag type of forward declarations of struct/class in C++.

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

12 years agoImprove x86 android support:
Rafael Espindola [Fri, 2 Nov 2012 20:41:30 +0000 (20:41 +0000)]
Improve x86 android support:
* -Bsymbolic must be added for x86 as well.
* Default CPU name also set to 'core2' for x86 android.
Patch by Edwin Vane.

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

12 years agoAdd test for link flags added by -fcatch-undefined-behavior.
Richard Smith [Fri, 2 Nov 2012 20:34:30 +0000 (20:34 +0000)]
Add test for link flags added by -fcatch-undefined-behavior.

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

12 years agoAdd -lpthread when building with Ubsan on Linux, in preparation for making libclang...
Richard Smith [Fri, 2 Nov 2012 20:32:19 +0000 (20:32 +0000)]
Add -lpthread when building with Ubsan on Linux, in preparation for making libclang-rt.ubsan pull in sanitizer_common, which in turn depends on pthreads.

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

12 years agoUpdate test case.
Ted Kremenek [Fri, 2 Nov 2012 17:50:53 +0000 (17:50 +0000)]
Update test case.

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

12 years agoMove -Wimplicit-retain-self to be off-by-default until we can evaluate
Ted Kremenek [Fri, 2 Nov 2012 17:48:49 +0000 (17:48 +0000)]
Move -Wimplicit-retain-self to be off-by-default until we can evaluate
more how noisy it is.

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

12 years agoclang/test/CodeGen/bitfield-promote.c: Add explicit triple for now. It has been faili...
NAKAMURA Takumi [Fri, 2 Nov 2012 09:59:12 +0000 (09:59 +0000)]
clang/test/CodeGen/bitfield-promote.c: Add explicit triple for now. It has been failing for big endian targets, for example, ppc.

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

12 years agoclang/test/CodeGen/bitfield-promote.c: FileCheck-ize.
NAKAMURA Takumi [Fri, 2 Nov 2012 09:59:06 +0000 (09:59 +0000)]
clang/test/CodeGen/bitfield-promote.c: FileCheck-ize.

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

12 years agoDelete lines which do nothing from DiagnosticGroups.td.
Eli Friedman [Fri, 2 Nov 2012 03:35:13 +0000 (03:35 +0000)]
Delete lines which do nothing from DiagnosticGroups.td.

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

12 years ago[libclang] Correct how the index inside the local preprocessed entities array
Argyrios Kyrtzidis [Fri, 2 Nov 2012 02:31:22 +0000 (02:31 +0000)]
[libclang] Correct how the index inside the local preprocessed entities array
is getting converted to a global PreprocessedEntityID.

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

12 years agoAdd missing diagnostic group to format string warning.
Eli Friedman [Fri, 2 Nov 2012 02:14:44 +0000 (02:14 +0000)]
Add missing diagnostic group to format string warning.

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

12 years agoanalyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.
NAKAMURA Takumi [Fri, 2 Nov 2012 02:04:01 +0000 (02:04 +0000)]
analyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.

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

12 years ago[analyzer] Convert some of the harder cases over to ProgramStateTrait macros.
Jordan Rose [Fri, 2 Nov 2012 01:54:42 +0000 (01:54 +0000)]
[analyzer] Convert some of the harder cases over to ProgramStateTrait macros.

Add FIXMEs for the traits visible from multiple translation units.
Currently the macros hide their key types in an anonymous namespace.

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

12 years ago[analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).
Jordan Rose [Fri, 2 Nov 2012 01:54:06 +0000 (01:54 +0000)]
[analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).

Also, move the REGISTER_*_WITH_PROGRAMSTATE macros to ProgramStateTrait.h.

This doesn't get rid of /all/ explicit uses of ProgramStatePartialTrait,
but it does get a lot of them.

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

12 years ago[analyzer] Rename 'EmitReport' to 'emitReport'.
Jordan Rose [Fri, 2 Nov 2012 01:53:40 +0000 (01:53 +0000)]
[analyzer] Rename 'EmitReport' to 'emitReport'.

No functionality change.

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

12 years agoTweak wording and add diagnostic groups to misc diagnostics.
Eli Friedman [Fri, 2 Nov 2012 01:40:23 +0000 (01:40 +0000)]
Tweak wording and add diagnostic groups to misc diagnostics.

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

12 years agoChange diagnostics for enums with fixed underlying type so in C++98 mode, we cite...
Eli Friedman [Fri, 2 Nov 2012 01:34:28 +0000 (01:34 +0000)]
Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11.

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

12 years agoInsert interception point onStartOfTranslationUnit.
Manuel Klimek [Fri, 2 Nov 2012 01:31:03 +0000 (01:31 +0000)]
Insert interception point onStartOfTranslationUnit.

Often users of the ASTMatchers want to add tasks that are done once per
translation unit, for example, cleaning up caches. Combined with the
interception point for the end of source file one can add to the factory
creation, this covers the cases we've seen users need.

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

12 years agoWhen finding a '(' after '::', emit error with hint to remove '(' and matching
Richard Trieu [Fri, 2 Nov 2012 01:08:58 +0000 (01:08 +0000)]
When finding a '(' after '::', emit error with hint to remove '(' and matching
')', if found.  Don't crash.
Fixes PR11852.

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

12 years agoUpdate the front end to use minsize attribute
Quentin Colombet [Thu, 1 Nov 2012 23:55:47 +0000 (23:55 +0000)]
Update the front end to use minsize attribute

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

12 years agoSimplify: replace getContext().getLangOpts() with just getLangOpts().
Richard Smith [Thu, 1 Nov 2012 22:30:59 +0000 (22:30 +0000)]
Simplify: replace getContext().getLangOpts() with just getLangOpts().

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

12 years agoClean up misapplication of diff.
Richard Smith [Thu, 1 Nov 2012 22:16:43 +0000 (22:16 +0000)]
Clean up misapplication of diff.

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

12 years agoSplit emission of -ftrapv checks and -fcatch-undefined-behavior checks into
Richard Smith [Thu, 1 Nov 2012 22:15:34 +0000 (22:15 +0000)]
Split emission of -ftrapv checks and -fcatch-undefined-behavior checks into
separate functions, since they share essentially no code.

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

12 years agoRemove divison-by-zero checks from -ftrapv. These checks were incompatible with
Richard Smith [Thu, 1 Nov 2012 22:13:39 +0000 (22:13 +0000)]
Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.

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

12 years agoFix the template type diffing to handle integral template arguments.
Richard Trieu [Thu, 1 Nov 2012 21:29:28 +0000 (21:29 +0000)]
Fix the template type diffing to handle integral template arguments.

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

12 years agoSilence -Wformat on platforms where uint64_t is unsigned long.
Matt Beaumont-Gay [Thu, 1 Nov 2012 20:26:42 +0000 (20:26 +0000)]
Silence -Wformat on platforms where uint64_t is unsigned long.

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

12 years agoobjective-C block meta-data. This patch completes meta-data
Fariborz Jahanian [Thu, 1 Nov 2012 18:32:55 +0000 (18:32 +0000)]
objective-C block meta-data. This patch completes meta-data
generation for captured block variables in arc mode. This includes
inlined version of the meta-data when it can be done. It also includes
severat tests. This is wip. // rdar://12184410.

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

12 years agoMake the FilenameRange of the InclusionDirective callback more accurate,
Argyrios Kyrtzidis [Thu, 1 Nov 2012 17:52:58 +0000 (17:52 +0000)]
Make the FilenameRange of the InclusionDirective callback more accurate,
preserve the macro location of the range end if the filename came from a macro.

Patch by Kim Gräsman!

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

12 years agoFix an incorrect assert, the LHS can be an LValue.
Rafael Espindola [Thu, 1 Nov 2012 14:32:20 +0000 (14:32 +0000)]
Fix an incorrect assert, the LHS can be an LValue.

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

12 years ago-fcatch-undefined-behavior: Start checking loads and stores for null pointers.
Richard Smith [Thu, 1 Nov 2012 07:22:08 +0000 (07:22 +0000)]
-fcatch-undefined-behavior: Start checking loads and stores for null pointers.
We want the diagnostic, and if the load is optimized away, we still want to
trap it. Stop checking non-default address spaces; that doesn't work in
general.

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

12 years ago[clang.py] Add Cursor.get_arguments()
Gregory Szorc [Thu, 1 Nov 2012 05:46:30 +0000 (05:46 +0000)]
[clang.py] Add Cursor.get_arguments()

Patch provided by Matthias Kleine <matthias_kleine@gmx.de>

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

12 years agoRemove first argument from Arg::getValue; it's been unused since r105760.
Richard Smith [Thu, 1 Nov 2012 04:30:05 +0000 (04:30 +0000)]
Remove first argument from Arg::getValue; it's been unused since r105760.

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

12 years agoRemove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
Richard Smith [Thu, 1 Nov 2012 03:48:49 +0000 (03:48 +0000)]
Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
and apparently unused (and since they are untested, they're presumably also
broken).

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

12 years ago[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
Argyrios Kyrtzidis [Thu, 1 Nov 2012 02:01:34 +0000 (02:01 +0000)]
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
the receiver of an ObjC message expression.

rdar://12578643

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

12 years agoclang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h: Appease...
NAKAMURA Takumi [Thu, 1 Nov 2012 01:47:02 +0000 (01:47 +0000)]
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h: Appease msvc.

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

12 years ago[analyzer] Optimize assumeDual by assuming constraint managers are consistent.
Jordan Rose [Thu, 1 Nov 2012 01:05:39 +0000 (01:05 +0000)]
[analyzer] Optimize assumeDual by assuming constraint managers are consistent.

Specifically, if adding a constraint makes the current system infeasible,
assume the constraint is false, instead of attempting to add its negation.

In +Asserts builds we will still assert that at least one state is feasible.

Patch by Ryan Govostes!

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

12 years ago[lit] For the "case-insensitive-filesystem" make sure to create the test temporary...
Argyrios Kyrtzidis [Thu, 1 Nov 2012 00:59:15 +0000 (00:59 +0000)]
[lit] For the "case-insensitive-filesystem" make sure to create the test temporary file
in the test output directory.

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

12 years ago[analyzer] Fix typo in r167186.
Jordan Rose [Thu, 1 Nov 2012 00:25:15 +0000 (00:25 +0000)]
[analyzer] Fix typo in r167186.

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

12 years agoclang/test/Index/code-completion-skip-bodies.cpp: Add XFAIL while investigating.
NAKAMURA Takumi [Thu, 1 Nov 2012 00:20:00 +0000 (00:20 +0000)]
clang/test/Index/code-completion-skip-bodies.cpp: Add XFAIL while investigating.

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

12 years ago[analyzer] Minor cleanup in SimpleStreamChecker's class definition.
Jordan Rose [Thu, 1 Nov 2012 00:18:41 +0000 (00:18 +0000)]
[analyzer] Minor cleanup in SimpleStreamChecker's class definition.

No functionality change.

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

12 years ago[analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue.
Jordan Rose [Thu, 1 Nov 2012 00:18:27 +0000 (00:18 +0000)]
[analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue.

(and the same for isFalse)

No functionality change.

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

12 years agoCorrectly reject gotos in function-level try blocks. PR14225.
Eli Friedman [Wed, 31 Oct 2012 23:55:28 +0000 (23:55 +0000)]
Correctly reject gotos in function-level try blocks.  PR14225.

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

12 years ago[analyzer] Fix a bug in SimpleStreamChecker - return after sink.
Anna Zaks [Wed, 31 Oct 2012 22:17:48 +0000 (22:17 +0000)]
[analyzer] Fix a bug in SimpleStreamChecker - return after sink.

Thanks Ted.

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

12 years ago[driver] Remove an extra space with the -iprefix option, so that
Chad Rosier [Wed, 31 Oct 2012 21:08:30 +0000 (21:08 +0000)]
[driver] Remove an extra space with the -iprefix option, so that
matching works correctly.
Part of rdar://12329974

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

12 years ago[PCH] Remove the stat cache from the PCH file.
Argyrios Kyrtzidis [Wed, 31 Oct 2012 20:59:50 +0000 (20:59 +0000)]
[PCH] Remove the stat cache from the PCH file.

The stat cache became essentially useless ever since we started
validating all file entries in the PCH.
But the motivating reason for removing it now is that it also affected
correctness in this situation:

-You have a header without include guards (using "#pragma once" or #import)
-When creating the PCH:
  -The same header is referenced in an #include with different filename cases.
  -In the PCH, of course, we record only one file entry for the header file
  -But we cache in the PCH file the stat info for both filename cases

-Then the source files are updated and the header file is updated in a way that
 its size and modification time are the same but its inode changes

-When using the PCH:
  -We validate the headers, we check that header file and we create a file entry with its current inode
  -There's another #include with a filename with different case than the previously created file entry
  -In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode
  -because of the different inodes, we think they are different files so we go ahead and include its contents.

Removing the stat cache will potentially break clients that are attempting to use the stat cache
as a way of avoiding having the actual input files available. If that use case is important, patches are welcome
to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with
literal strings, line/column computations, etc.).

This fixes rdar://5502805

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

12 years ago[clang tests] Added require ppc64-registered-target to Headers/altivec-header.c to...
Michael Gottesman [Wed, 31 Oct 2012 20:20:04 +0000 (20:20 +0000)]
[clang tests] Added require ppc64-registered-target to Headers/altivec-header.c to ensure it only runs on ppc64.

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

12 years ago[driver] Remove an extra space with the -internal-externc-isystem option, so
Chad Rosier [Wed, 31 Oct 2012 19:28:55 +0000 (19:28 +0000)]
[driver] Remove an extra space with the -internal-externc-isystem option, so
that matching works correctly.
Part of rdar://12329974

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

12 years agoARM AAPCS-VFP: fix tracking of allocated VFP registers.
Manman Ren [Wed, 31 Oct 2012 19:02:26 +0000 (19:02 +0000)]
ARM AAPCS-VFP: fix tracking of allocated VFP registers.

According to the spec, we can backfill VFP registers that were skipped due
to alignment constraints.

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

12 years ago[driver] Remove the -ccc-host-triple alias. This has been replaced by the
Chad Rosier [Wed, 31 Oct 2012 18:59:38 +0000 (18:59 +0000)]
[driver] Remove the -ccc-host-triple alias.  This has been replaced by the
-target option.
rdar://10692880

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

12 years agogetArchTypeForDarwinArchName is only used in the clang driver, copy it there.
Rafael Espindola [Wed, 31 Oct 2012 18:51:07 +0000 (18:51 +0000)]
getArchTypeForDarwinArchName is only used in the clang driver, copy it there.
I will remove it from llvm in the next commit.

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

12 years agoFix for -ast-dump-filter
Alexander Kornienko [Wed, 31 Oct 2012 18:46:31 +0000 (18:46 +0000)]
Fix for -ast-dump-filter

Summary:
-ast-dump-filter implementation used to stop AST traversal after traversing a NULL Decl node.

Added test and fixed.

Reviewers: djasper, klimek, rsmith

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D93

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

12 years ago[driver] Completely rework how superfluous options are stripped out of the crash
Chad Rosier [Wed, 31 Oct 2012 18:31:33 +0000 (18:31 +0000)]
[driver] Completely rework how superfluous options are stripped out of the crash
diagnostics script.

This addresses the FIXME pertaining to quoted arguments.  We also delineate
between those flags that have an argument (e.g., -D macro, -MF file) and
those that do not (e.g., -M, -MM, -MG).  Finally, we add the -dwarf-debug-flags
to the list of flags to be removed.
rdar://12329974

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

12 years agoAdd "static" to some functions in altivec.c where it was missing.
Ulrich Weigand [Wed, 31 Oct 2012 18:17:07 +0000 (18:17 +0000)]
Add "static" to some functions in altivec.c where it was missing.

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

12 years agoThis patch removes the XFAIL for powerpc for
Bill Schmidt [Wed, 31 Oct 2012 17:31:46 +0000 (17:31 +0000)]
This patch removes the XFAIL for powerpc for
test/CodeGenCXX/member-alignment.cpp.  The test succeeds for
powerpc64-unknown-linux-gnu.  If other flavors of powerpc are
shown by buildbots to still be broken, we can adjust the test
at that time.

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

12 years agoIf skipping bodies is enabled outside code-completion, just skip the body directly
Argyrios Kyrtzidis [Wed, 31 Oct 2012 17:29:28 +0000 (17:29 +0000)]
If skipping bodies is enabled outside code-completion, just skip the body directly
without using tentative parsing.

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

12 years agoDecouple code-completion for the SkipFunctionBodies frontend option and
Argyrios Kyrtzidis [Wed, 31 Oct 2012 17:29:22 +0000 (17:29 +0000)]
Decouple code-completion for the SkipFunctionBodies frontend option and
add a test to make sure code-completion skips bodies.

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

12 years ago[analyzer] Let ConstraintManager subclasses provide a more efficient checkNull.
Jordan Rose [Wed, 31 Oct 2012 16:44:55 +0000 (16:44 +0000)]
[analyzer] Let ConstraintManager subclasses provide a more efficient checkNull.

Previously, every call to a ConstraintManager's isNull would do a full
assumeDual to test feasibility. Now, ConstraintManagers can override
checkNull if they have a cheaper way to do the same thing.
RangeConstraintManager can do this in less than half the work.

<rdar://problem/12608209>

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

12 years agoFix if-else braces layout accordingly to the style guide.
Simon Atanasyan [Wed, 31 Oct 2012 14:39:28 +0000 (14:39 +0000)]
Fix if-else braces layout accordingly to the style guide.

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

12 years agoExtend -Bprefix functionality and make it closer to gcc. If the "prefix"
Simon Atanasyan [Wed, 31 Oct 2012 12:01:53 +0000 (12:01 +0000)]
Extend -Bprefix functionality and make it closer to gcc. If the "prefix"
is not a directory, Driver::GetProgramPath() routine does not try to append
the program name as a "path component" to it. It just joins the "prefix" with
the program name and checks the resulting path existence.

The patch reviewed by Rafael Espindola.

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

12 years agoRemove empty directories.
Rafael Espindola [Wed, 31 Oct 2012 02:34:48 +0000 (02:34 +0000)]
Remove empty directories.

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

12 years ago[analyzer] SimpleStreamChecker - remove evalAssume and other refinements
Anna Zaks [Wed, 31 Oct 2012 02:32:41 +0000 (02:32 +0000)]
[analyzer] SimpleStreamChecker - remove evalAssume and other refinements

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

12 years agoRemove really old benchmark data.
Rafael Espindola [Wed, 31 Oct 2012 02:29:15 +0000 (02:29 +0000)]
Remove really old benchmark data.

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

12 years agoRemove the -ccc-no-clang option.
Rafael Espindola [Wed, 31 Oct 2012 01:21:20 +0000 (01:21 +0000)]
Remove the -ccc-no-clang option.

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

12 years ago[analyzer]Don't invalidate const arguments when there is no
Anna Zaks [Wed, 31 Oct 2012 01:18:26 +0000 (01:18 +0000)]
[analyzer]Don't invalidate const arguments when there is no
IdentifierInfo.

Ee: C++ copy constructors.

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

12 years agoAddress Jordan's review: comments, spaces.
Anna Zaks [Wed, 31 Oct 2012 01:18:22 +0000 (01:18 +0000)]
Address Jordan's review: comments, spaces.

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

12 years agoadd test for r167063
Seth Cantrell [Wed, 31 Oct 2012 01:03:35 +0000 (01:03 +0000)]
add test for r167063

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

12 years agoisLegalUTF8() was giving the wrong answer
Seth Cantrell [Tue, 30 Oct 2012 23:50:26 +0000 (23:50 +0000)]
isLegalUTF8() was giving the wrong answer

invalid but not caught by isLegalUTF8(): 0xED 0x75 0x84

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

12 years agoRemove ccc-no-clang-cpp, which is also dead now.
Rafael Espindola [Tue, 30 Oct 2012 23:49:11 +0000 (23:49 +0000)]
Remove ccc-no-clang-cpp, which is also dead now.

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

12 years agoHandle string encoding diagnostics when there are too many invalid ranges.
David Blaikie [Tue, 30 Oct 2012 23:22:22 +0000 (23:22 +0000)]
Handle string encoding diagnostics when there are too many invalid ranges.

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

12 years agoARM AAPCS-VFP: fix handling of homogeneous aggreate.
Manman Ren [Tue, 30 Oct 2012 23:21:41 +0000 (23:21 +0000)]
ARM AAPCS-VFP: fix handling of homogeneous aggreate.

If HA can only partially fit into VFP registers, we add padding to make sure
HA will be on stack and later VFP CPRCs will be on stack as well.

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

12 years ago[driver] Older versions of ld expect '-L<dir>' not '-L <dir>'. In Xcode4 and
Chad Rosier [Tue, 30 Oct 2012 21:42:09 +0000 (21:42 +0000)]
[driver] Older versions of ld expect '-L<dir>' not '-L <dir>'.  In Xcode4 and
later, '-L <dir>' is allowed, but rewrite these in the driver as '-L<dir>' to
maintain backward compatibility.  The same is true for the -I option.
rdar://12366753

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

12 years agoobjective-C arc/mrr: Another patch for the new captured block variable
Fariborz Jahanian [Tue, 30 Oct 2012 20:05:29 +0000 (20:05 +0000)]
objective-C arc/mrr: Another patch for the new captured block variable
layout meta-data.  It is currently off (so no tests). This is wip.

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

12 years agoChange ForceSizeOpt attribute into MinSize attribute
Quentin Colombet [Tue, 30 Oct 2012 16:33:19 +0000 (16:33 +0000)]
Change ForceSizeOpt attribute into MinSize attribute

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

12 years agoImplement descendant matchers for NestedNamespecifiers
Daniel Jasper [Tue, 30 Oct 2012 15:42:00 +0000 (15:42 +0000)]
Implement descendant matchers for NestedNamespecifiers

This implements has(), hasDescendant(), forEach() and
forEachDescendant() for NestedNameSpecifier and NestedNameSpecifierLoc
matchers.

Review: http://llvm-reviews.chandlerc.com/D86

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

12 years agoremove duplicate data array
Seth Cantrell [Tue, 30 Oct 2012 06:13:52 +0000 (06:13 +0000)]
remove duplicate data array

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

12 years agofix calculation of end pointer
Seth Cantrell [Tue, 30 Oct 2012 06:13:50 +0000 (06:13 +0000)]
fix calculation of end pointer

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

12 years agoUpdate test case.
Ted Kremenek [Tue, 30 Oct 2012 05:28:33 +0000 (05:28 +0000)]
Update test case.

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

12 years ago[asan docs] explain why asan exits on the first error
Kostya Serebryany [Tue, 30 Oct 2012 05:07:05 +0000 (05:07 +0000)]
[asan docs] explain why asan exits on the first error

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

12 years agoChange -Wcompare-distinct-pointer-type to -Wcompare-distinct-pointer-types, as
Ted Kremenek [Tue, 30 Oct 2012 04:43:57 +0000 (04:43 +0000)]
Change -Wcompare-distinct-pointer-type to -Wcompare-distinct-pointer-types, as
the warning is about comparing different types (plural).

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

12 years agoTrim #includes.
Ted Kremenek [Tue, 30 Oct 2012 04:43:51 +0000 (04:43 +0000)]
Trim #includes.

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

12 years ago[analyzer]SimpleStreamChecker: add a TODO for better leak report.
Anna Zaks [Tue, 30 Oct 2012 04:18:21 +0000 (04:18 +0000)]
[analyzer]SimpleStreamChecker: add a TODO for better leak report.

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

12 years ago[analyzer] Fix a bug in REGISTER_MAP_WITH_PROGRAMSTATE
Anna Zaks [Tue, 30 Oct 2012 04:17:40 +0000 (04:17 +0000)]
[analyzer] Fix a bug in REGISTER_MAP_WITH_PROGRAMSTATE

The ImmutableMap should not be the key into the GDM map as there could
be several entries with the same map type. Thanks, Jordan.

This complicates the usage of the macro a bit. When we want to retrieve
the whole map, we need to use another name. Currently, I set it to be
Name ## Ty as in "type of the map we are storing in the ProgramState".

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

12 years ago[analyzer] Rename REGISTER_MAP_WITH_GDM ->REGISTER_MAP_WITH_PROGRAMSTATE
Anna Zaks [Tue, 30 Oct 2012 04:17:18 +0000 (04:17 +0000)]
[analyzer] Rename REGISTER_MAP_WITH_GDM ->REGISTER_MAP_WITH_PROGRAMSTATE

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

12 years agoRemove leftover const.
Rafael Espindola [Tue, 30 Oct 2012 01:49:46 +0000 (01:49 +0000)]
Remove leftover const.

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

12 years ago[analyzer] Warn about reallocf with an allocation size of 0, like realloc.
Jordan Rose [Tue, 30 Oct 2012 01:37:16 +0000 (01:37 +0000)]
[analyzer] Warn about reallocf with an allocation size of 0, like realloc.

Patch by Sean McBride!

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

12 years ago[analyzer] New checker for missing super calls in UIViewController subclasses.
Jordan Rose [Tue, 30 Oct 2012 01:21:35 +0000 (01:21 +0000)]
[analyzer] New checker for missing super calls in UIViewController subclasses.

This is a syntactic checker aimed at helping iOS programmers correctly
subclass and override the methods of UIViewController. While this should
eventually be covered by the 'objc_requires_super' attribute, this
checker can be used with the existing iOS SDKs without any header changes.

This new checker is currently named 'alpha.osx.cocoa.MissingSuperCall'.
Patch by Julian Mayer!

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

12 years agoDon't crash on bad atomic operations. PR14176.
Eli Friedman [Tue, 30 Oct 2012 01:15:28 +0000 (01:15 +0000)]
Don't crash on bad atomic operations.  PR14176.

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

12 years agogetOriginalSourceFileName and getOriginalSourceFile can return a StringRef.
Rafael Espindola [Tue, 30 Oct 2012 00:38:13 +0000 (00:38 +0000)]
getOriginalSourceFileName and getOriginalSourceFile can return a StringRef.
MaybeAddSystemRootToFilename doesn't need to return anything, it modifies
its argument.

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

12 years ago[PCH] The diagnostic state points can refer to previously created
Argyrios Kyrtzidis [Tue, 30 Oct 2012 00:27:21 +0000 (00:27 +0000)]
[PCH] The diagnostic state points can refer to previously created
diagnostic states; make sure the ASTReader sets the diagnostic state
properly instead of always recreating it.

Fixes rdar://12581618 & http://llvm.org/PR14181

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

12 years agoIn the past "production" clang builds would not be used for c++, and
Rafael Espindola [Tue, 30 Oct 2012 00:13:16 +0000 (00:13 +0000)]
In the past "production" clang builds would not be used for c++, and
we had the -ccc-clang-cxx and -ccc-no-clang-cxx options to force them
on or off for testing.

Clang c++ support is now production quality and these options are dead.

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