]>
granicus.if.org Git - clang/log
Nick Lewycky [Wed, 21 Aug 2013 18:57:51 +0000 (18:57 +0000)]
Revert r188863 which could propose wrong fixits for multibyte character literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188918
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 21 Aug 2013 18:49:03 +0000 (18:49 +0000)]
ObjectiveC migrator: until we have beter understanding of
setter/getter implementations, migrate them to
nonatomic properties.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188914
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 21 Aug 2013 18:13:43 +0000 (18:13 +0000)]
Remove dead code.
setFeatureEnabled is never called with "32" or "64". The driver never passes it
and mips' getDefaultFeatures sets the Features map directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188913
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 21 Aug 2013 17:34:32 +0000 (17:34 +0000)]
Move the logic for selecting the last feature in the command line to the driver.
This is a partial revert of r188817 now that the driver handles -target-feature
in a single place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188910
91177308 -0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Wed, 21 Aug 2013 17:33:16 +0000 (17:33 +0000)]
[CGF] Get rid of passing redundant VTable pointer around in CodeGenFunction::InitializeVTablePointer[s]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188909
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 21 Aug 2013 16:39:20 +0000 (16:39 +0000)]
Centralize the handling of -target-feature.
No functionality change other than changing the order of -target-feature
relative to other -cc1 command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188906
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 21 Aug 2013 16:37:37 +0000 (16:37 +0000)]
Tweak gnu-flags.c test for z, where globals have 2-byte alignment by default
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188905
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 21 Aug 2013 13:28:02 +0000 (13:28 +0000)]
Don't disable SSE4A when disabling AVX.
Thanks for Craig Topper for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188902
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 21 Aug 2013 11:45:27 +0000 (11:45 +0000)]
Sema: Use the right type for PredefinedExpr when it's in a lambda.
1. We now print the return type of lambdas and return type deduced functions
as "auto". Trailing return types with decltype print the underlying type.
2. Use the lambda or block scope for the PredefinedExpr type instead of the
parent function. This fixes PR16946, a strange mismatch between type of the
expression and the actual result.
3. Verify the type in CodeGen.
4. The type for blocks is still wrong. They are numbered and the name is not
known until CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 21 Aug 2013 08:39:01 +0000 (08:39 +0000)]
clang-format: Indent relative to unary operators.
Before:
if (!
aaaaaaaaaa ( // break
aaaaa)) {
}
After:
if (!
aaaaaaaaaa ( // break
aaaaa)) {
}
Also cleaned up formatting using clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188891
91177308 -0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Wed, 21 Aug 2013 06:25:03 +0000 (06:25 +0000)]
Abstract out virtual calls and virtual function prologue code generation; implement them for -cxx-abi microsoft
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 21 Aug 2013 05:29:10 +0000 (05:29 +0000)]
Add avx512cd, avx512er, avx512pf feature flags and enable them on KNL CPU.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188867
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 21 Aug 2013 04:10:58 +0000 (04:10 +0000)]
Issue fixits replacing invalid character literals with the equivalent \xNN
escape code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188863
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 21 Aug 2013 04:01:01 +0000 (04:01 +0000)]
Revert accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188862
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 21 Aug 2013 04:00:44 +0000 (04:00 +0000)]
Revert accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188861
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 21 Aug 2013 03:59:22 +0000 (03:59 +0000)]
Replace avx-512 with avx512f to match llvm side and what gcc patches appear to be using.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188860
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 21 Aug 2013 02:40:19 +0000 (02:40 +0000)]
No functionality change. Adjust a bunch of formatting issues in this code and
fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188857
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 21 Aug 2013 01:51:19 +0000 (01:51 +0000)]
Remove more uses of 'index' as namespace scope.
Follow up to r188850.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188854
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 21 Aug 2013 01:40:36 +0000 (01:40 +0000)]
If we find an error in the range expression in a range-based for loop, and the
loop variable has a type containing 'auto', set the declaration to be invalid
(because we couldn't deduce its type) to prevent follow-on errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188853
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 21 Aug 2013 00:49:25 +0000 (00:49 +0000)]
Avoid using the 'index' namespace as scope.
This should fix the bogus ambiguous reference errors reported by gcc 4.2.1 that the FreeBSD bot is using.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188850
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 20 Aug 2013 23:35:26 +0000 (23:35 +0000)]
ObjectiveC migrator. make sure to embed audited
candidate functions in their CF_IMPLICIT_BRIDGING_ENABLED
pragma before exiting the header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188846
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 20 Aug 2013 22:44:32 +0000 (22:44 +0000)]
Remove Extension warning for GNU local labels.
We generally don't warn about extensions involving keywords reserved
for the implementation, so we shouldn't warn here either: the
standard doesn't require it, and it doesn't provide useful information
to the user.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188840
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 20 Aug 2013 22:44:28 +0000 (22:44 +0000)]
Add more specific flags for misc GNU extensions.
This adds the following as subgroups of -Wgnu: -Wgnu-alignof-expression,
-Wgnu-case-range, -Wgnu-complex-integer, -Wgnu-conditional-omitted-operand,
-Wgnu-empty-initializer, -Wgnu-label-as-value, -Wgnu-local-label,
and -Wgnu-statement-expression,
Patch by Peter Lewis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188839
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 20 Aug 2013 22:42:13 +0000 (22:42 +0000)]
ObjectiveC migrator: make sure audited pragams are
dumped for last declarations in the current TU. wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188838
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 20 Aug 2013 22:12:08 +0000 (22:12 +0000)]
Centralize the handling of -target-cpu (-cc1, -cc1as) and -mcpu (gold plugin).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188837
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 20 Aug 2013 22:01:44 +0000 (22:01 +0000)]
Test case for PR16933/r188707.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188836
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 20 Aug 2013 22:01:43 +0000 (22:01 +0000)]
Fix iterator invalidation. PR16935.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188835
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 20 Aug 2013 21:49:21 +0000 (21:49 +0000)]
DebugInfo: comment/inlining based on feedback from Eric & Adrian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188834
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 20 Aug 2013 21:47:50 +0000 (21:47 +0000)]
Look at lowercase version of argv[0] when determining driver mode
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188833
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 20 Aug 2013 21:03:29 +0000 (21:03 +0000)]
DebugInfo: Simplify/clarify propagation of typemembers between declaration and definition
Based on code review feedback from Eric Christopher (on r188739) and
Adrian Prantl (r188642).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188829
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 20 Aug 2013 20:45:28 +0000 (20:45 +0000)]
ObjectiveC migrator: More tweaking of heuristics
for an audited cf function to not include those
which are annotated by user.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 20 Aug 2013 20:35:18 +0000 (20:35 +0000)]
During typo correction, check for an exact match in an unimported module. If we
find one, then report the error as a missing import instead of as a typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edwin Vane [Tue, 20 Aug 2013 19:07:21 +0000 (19:07 +0000)]
Adding Replacement serialization support
Adding a new data structure for storing the Replacements generated for a single
translation unit. Structure contains a vector of Replacements as well a field
indicating the main source file of the translation unit. An optional 'Context'
field allows for tools to provide any information they want about the context
the Replacements were generated in. This context is printed, for example, when
detecting conflicts during Replacement deduplication.
YAML serialization for this data structure is implemented in this patch. Tests
are included.
Differential Revision: http://llvm-reviews.chandlerc.com/D1422
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188818
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 20 Aug 2013 18:57:55 +0000 (18:57 +0000)]
Centralize the logic for handling -m* options and fix pr16943.
This moves the logic for handling -mfoo -mno-foo from the driver to -cc1. It
also changes -cc1 to apply the options in order, fixing pr16943.
The handling of -mno-mmx -msse is now an explicit special case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 20 Aug 2013 18:54:39 +0000 (18:54 +0000)]
ObjectiveC migrator: More tweaking of heuristics
for an audited cf function and addition of
a test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188816
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 20 Aug 2013 15:30:32 +0000 (15:30 +0000)]
Remove duplicated error checking.
The driver validates its options, so we don't need to redo the work in
"clang -cc1".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 20 Aug 2013 14:49:36 +0000 (14:49 +0000)]
[LSan] Add support for building standalone LSan runtime to Make build (clang part)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188805
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 20 Aug 2013 14:18:24 +0000 (14:18 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 20 Aug 2013 13:44:29 +0000 (13:44 +0000)]
Refactor the x86 feature handling.
This removes the very long chains of
Feature["avx"] = Feature["sse42"] = ... = true;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188799
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 20 Aug 2013 13:19:43 +0000 (13:19 +0000)]
ARM: add test for last commit
This time I managed to forget the test.
Patch still by Stephen Kelly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 20 Aug 2013 13:13:38 +0000 (13:13 +0000)]
ARM: default to arm1176jzf-s for hard-float platforms.
It makes no sense to try and compile for arm7tdmi when we're targeting
something like gnueabihf. Although not strictly the most basic hardware
conceivable, I believe arm1176jzf-s is a reasonable compromise (that can always
be overridden explicitly if needed) since it's still in reasonably common use
unlike earlier cores.
Patch by Stephen Kelly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 20 Aug 2013 12:42:50 +0000 (12:42 +0000)]
clang-format: Format enum struct/class like enum.
Patch by Joe Hermaszewski. Thank you!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188794
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 20 Aug 2013 12:36:34 +0000 (12:36 +0000)]
clang-format: Additional options for spaces around parentheses.
This patch adds four new options to control:
- Spaces after control keyworks (if(..) vs if (..))
- Spaces in empty parentheses (f( ) vs f())
- Spaces in c-style casts (( int )1.0 vs (int)1.0)
- Spaces in other parentheses (f(a) vs f( a ))
Patch by Joe Hermaszewski. Thank you for working on this!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188793
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 20 Aug 2013 12:33:59 +0000 (12:33 +0000)]
ARCMigrate depends on the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188792
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 20 Aug 2013 12:16:48 +0000 (12:16 +0000)]
clang/test/Driver/cl-options.c: Remove the feature "clang-driver". It has been working since r188331.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188790
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 20 Aug 2013 12:16:42 +0000 (12:16 +0000)]
clang/test/Driver: Remove the feature "clang-driver" since gcc-as has not been used with -integrated-as since r177360.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188789
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 20 Aug 2013 12:16:35 +0000 (12:16 +0000)]
clang/test/Driver: Remove the feature "clang-driver" in three tests since they might work as expected since their first commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188788
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 20 Aug 2013 09:47:12 +0000 (09:47 +0000)]
[mips][msa] Added fexdo, fexup[lr] builtins
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188784
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 20 Aug 2013 07:52:37 +0000 (07:52 +0000)]
Rename __AVX512__ to __AVX512F__
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188764
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 20 Aug 2013 07:41:18 +0000 (07:41 +0000)]
[autotools->cmake] Added support for building clang with an order file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 20 Aug 2013 07:39:54 +0000 (07:39 +0000)]
Change 'avx512' to 'avx-512' to match llvm backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 20 Aug 2013 07:09:54 +0000 (07:09 +0000)]
[autotools->cmake] Move add_subdirectory(test) inside CLANG_INCLUDE_TESTS to match the behavior of the LLVM where LLVM_INCLUDE_TESTS controls whether tests is included.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188760
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 20 Aug 2013 07:09:51 +0000 (07:09 +0000)]
[autotools->cmake] Added support for creating the clang driver plist for OS X.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 20 Aug 2013 07:09:39 +0000 (07:09 +0000)]
Add AVX-512 feature flag and knl cpu to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 20 Aug 2013 07:07:29 +0000 (07:07 +0000)]
Revert r188756 because some other changes snuck in with it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188757
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 20 Aug 2013 07:05:05 +0000 (07:05 +0000)]
Add AVX-512 feature flag and knl cpu to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188756
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 20 Aug 2013 01:28:15 +0000 (01:28 +0000)]
Revert "Revert "Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class""""
This reverts commit r188687 (reverts r188642 (reverts 188600 (reverts
188576))).
With added test coverage & fix for -gline-tables-only.
Thanks Michael Gottesman for reverting this patch when it demonstrated
problems & providing a reproduction/details to help me track this down.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188739
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 20 Aug 2013 00:39:40 +0000 (00:39 +0000)]
Fix name lookup with dependent using decls.
We previously mishandled UnresolvedUsingValueDecls in
NamedDecl::declarationReplaces, which caused us to forget decls
when there are multiple dependent using decls for the same name.
Fixes PR16936.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 20 Aug 2013 00:07:23 +0000 (00:07 +0000)]
ObjectiveC migrator: More work towards
insertion of ObjC audit pragmas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188733
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 19 Aug 2013 23:57:44 +0000 (23:57 +0000)]
clang-cl: Ignore the /wd n flag for disabling a warning
Clang doesn't have a table mapping cl.exe to clang warnings. While some
warnings like -Wsign-compare exist in both compilers, the majority do
not correspond and should usually be ignored.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 23:54:35 +0000 (23:54 +0000)]
[analyzer] Note that deadcode.UnmodifiedVariable would be an opt-in checker.
Website-only change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 19 Aug 2013 23:52:36 +0000 (23:52 +0000)]
clang-cl: Add /MP[n] to the list of unsupported and ignored flags
This flag tells cl.exe to use up to n processes to compile the provided
source files. I have no plans to implement this in clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188729
91177308 -0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 19 Aug 2013 23:08:53 +0000 (23:08 +0000)]
Fix last commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188724
91177308 -0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 19 Aug 2013 22:20:37 +0000 (22:20 +0000)]
Simplify code by using CreateMemTemp. No functional change intended.
Reviewer: Eli
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 19 Aug 2013 22:12:56 +0000 (22:12 +0000)]
Handle init lists and _Atomic fields.
Fixes PR16931.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188718
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 19 Aug 2013 22:06:05 +0000 (22:06 +0000)]
PR16727: don't try to evaluate a potentially value-dependent expression when
checking for missing parens in &&/|| expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188716
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 19 Aug 2013 22:00:50 +0000 (22:00 +0000)]
ObjectiveC migrator: Start inserting
CF_IMPLICIT_BRIDGING_ENABLE/CF_IMPLICIT_BRIDGING_DISABLED
pair. wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188714
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 19 Aug 2013 21:02:26 +0000 (21:02 +0000)]
PR16933: Don't try to codegen things after we've seen errors.
Refactor the underlying code a bit to remove unnecessary calls to
"hasErrorOccurred" & make them consistently at all the entry points to
the IRGen ASTConsumer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188707
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Wilhelm [Mon, 19 Aug 2013 20:51:20 +0000 (20:51 +0000)]
const'ify Sema::ActOnCompoundStmt by
changing Parameter of Sema::ActOnCompoundStmt from MutableArrayRef to
ArrayRef.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 19 Aug 2013 20:23:37 +0000 (20:23 +0000)]
Bump the value of the __APPLE_CC__ predefined macro up to 6000.
The previous value was set to match some ancient version of Apple's GCC.
The value should be higher than anything used by Apple's GCC, but we don't
intend for this value to be updated in the future. We have other macros to
identify compiler versions. <rdar://problem/
14749599 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 19 Aug 2013 19:13:34 +0000 (19:13 +0000)]
ObjectiveC migrator. Start auditing CF functions
for possible use of CF_IMPLICIT_BRIDGING_ENABLE
pragma.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188691
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 19 Aug 2013 18:46:16 +0000 (18:46 +0000)]
Revert "Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"""
This reverts commit r188642.
This change is causing LTO builds to cause our 16 GB machines to swap and OOM
all weekend. I am going to work with Dave Blaikie to resolve the issue.
Sorry Dave =(.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188687
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 19 Aug 2013 18:35:25 +0000 (18:35 +0000)]
Simplify assert-neutral matching in test case.
Originally committed in r188651, improved/fixed to be assert-neutral by
Takumi in r188661.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 19 Aug 2013 18:32:59 +0000 (18:32 +0000)]
clang-cl: Expose the -Xclang option
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 17:46:55 +0000 (17:46 +0000)]
[analyzer] Add a triple to test/Analysis/cfg.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 17:03:12 +0000 (17:03 +0000)]
[analyzer] Don't run unreachable code checker on inlined functions.
This is still an alpha checker, but we use it in certain tests to make sure
something is not being executed.
This should fix the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188682
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 16:27:37 +0000 (16:27 +0000)]
[analyzer] Add "unmodified variable" checker to the Potential Checkers.
This is PR16890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 16:27:34 +0000 (16:27 +0000)]
[analyzer] Assume that strings are no longer than SIZE_MAX/4.
This keeps the analyzer from making silly assumptions, like thinking
strlen(foo)+1 could wrap around to 0. This fixes PR16558.
Patch by Karthik Bhat!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188680
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 16:27:28 +0000 (16:27 +0000)]
Omit arguments of __builtin_object_size from the CFG.
This builtin does not actually evaluate its arguments for side effects,
so we shouldn't include them in the CFG. In the analyzer, rely on the
constant expression evaluator to get the proper semantics, at least for
now. (In the future, we could get ambitious and try to provide path-
sensitive size values.)
In theory, this does pose a problem for liveness analysis: a variable can
be used within the __builtin_object_size argument expression but not show
up as live. However, it is very unlikely that such a value would be used
to compute the object size and not used to access the object in some way.
<rdar://problem/
14760817 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 19 Aug 2013 16:14:33 +0000 (16:14 +0000)]
Use cstdio instead of stdio.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Mon, 19 Aug 2013 15:23:34 +0000 (15:23 +0000)]
[analyzer] Fix inefficiency in dead symbol removal
Summary:
ScanReachableSymbols uses a "visited" set to avoid scanning the same object
twice. However, it did not use the optimization for LazyCompoundVal objects,
which resulted in exponential complexity for long chains of temporary objects.
Adding this resulted in a decrease of analysis time from >3h to 3 seconds for
some files.
Reviewers: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1398
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188677
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 13:59:22 +0000 (13:59 +0000)]
Re-apply r188666
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 13:07:12 +0000 (13:07 +0000)]
Fix -Wcovered-switch-default warning from r188664
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188672
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 19 Aug 2013 11:51:51 +0000 (11:51 +0000)]
clang/Driver: [PR12920] Don't forward any -W arguments to gcc-as and gcc-ld.
AFAIK, there are no -W options for gcc-as and gcc-ld.
It caused failure to build clang with gcc-4.7 on cygwin.
FIXME: Could we recategorize Options for gcc-as and gcc-ld?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188668
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 11:42:54 +0000 (11:42 +0000)]
Revert r188666: it breaks the buildbots
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188667
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 10:41:30 +0000 (10:41 +0000)]
Fix PR16768: properly report malformed sanitizer blacklist file contents
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 19 Aug 2013 10:16:18 +0000 (10:16 +0000)]
clang-format: Fix return type line break decision.
This accidentally introduced by r186077, as function names were not
correctly recognized in templated declarations.
Before:
template <class TemplateIt>
SomeReturnType
SomeFunction(TemplateIt begin, TemplateIt end, TemplateIt* stop) {}
After:
template <class TemplateIt>
SomeReturnType SomeFunction(TemplateIt begin, TemplateIt end,
TemplateIt* stop) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Mon, 19 Aug 2013 09:46:39 +0000 (09:46 +0000)]
XCore target: Add target specific EmitVAArg
This is so aggregates can be passed as var args too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Mon, 19 Aug 2013 09:46:32 +0000 (09:46 +0000)]
XCore target: correct test layout
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 09:45:19 +0000 (09:45 +0000)]
Explicitly specify triple in driver test from r188660
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188662
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 19 Aug 2013 09:37:23 +0000 (09:37 +0000)]
clang/test/CodeGenObjC/2010-02-09-DbgSelf.m: Tweak for -Asserts in r188651.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 09:14:21 +0000 (09:14 +0000)]
Move SanitizerArgs to the clang Driver
Summary:
This change turns SanitizerArgs into high-level options
stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser.
Reviewers: rsmith
Reviewed By: rsmith
CC: chandlerc, eugenis, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1341
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188660
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Wilhelm [Mon, 19 Aug 2013 07:57:02 +0000 (07:57 +0000)]
Omit llvm:: before makeArrayRef. We have using directive in this file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 19 Aug 2013 07:13:02 +0000 (07:13 +0000)]
Comment parsing tests: move tests where they belong
Move C++-specific tests that were checking if we attach a base class comment to
a derived class to an existing test comment-to-html-xml-conversion.cpp. Note
that the original testing approach was not actually testing the class--comment
relationship. It only checked that we attached the comment *somewhere*.
The rest of subclass-comment.mm should be also moved elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188658
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 19 Aug 2013 07:10:13 +0000 (07:10 +0000)]
Comment parsing tests: move tests where they belong
comment-misc-tags.m is mostly about miscellaneous Doxygen tags. Move out tests
that check if the comment is attached to an ObjC decl. Because the exitsting
test for this is in C++ (annotate-comments.cpp), create a new test --
annotate-comments-objc.m.
The rest of comment-misc-tags.m should be also moved elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188657
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 19 Aug 2013 03:41:04 +0000 (03:41 +0000)]
Fix indentation. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188652
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 19 Aug 2013 03:37:48 +0000 (03:37 +0000)]
DebugInfo: Do not include line/file info for artificial parameters & parameters of artificial functions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188651
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 19 Aug 2013 03:11:34 +0000 (03:11 +0000)]
Make the version of Stmt::operator new that takes ASTContext* call the ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188648
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 19 Aug 2013 02:43:08 +0000 (02:43 +0000)]
Sema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction
Summary:
DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will
never fire.
Reviewers: eli.friedman, doug.gregor, majnemer
Reviewed By: majnemer
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1434
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 18 Aug 2013 20:38:37 +0000 (20:38 +0000)]
Revert r188644 to unbreak buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188645
91177308 -0d34-0410-b5e6-
96231b3b80d8