Fariborz Jahanian
c1c44f62bc
ObjectiveC migrator: Another use case of enum
...
declaration which can be migrated to NS_ENUM.
llvm-svn: 186716
2013-07-19 20:18:36 +00:00
Samuel Benzaquen
b837248ad4
Add support for raw_ostream on the printing methods of Diagnostics.
...
Summary:
Add printToStream*(llvm::raw_ostream&) methods to Diagnostics, and reimplement everything based on streams instead of concatenating strings.
Also, fix some functions to start with lowercase to match the style guide.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1187
llvm-svn: 186715
2013-07-19 20:02:35 +00:00
Reid Kleckner
569b8f83a4
Create calling convention AttributedType sugar nodes
...
Canonical types are unchanged. The type printer had to be changed to
avoid printing any non-default implicit calling convention as well as
the calling convention attribute.
Reviewers: rjmccall
Differential Revision: http://llvm-reviews.chandlerc.com/D1132
llvm-svn: 186714
2013-07-19 19:51:03 +00:00
Eli Friedman
8917ad5d1f
Fix for template substitution with packs.
...
When we see a pack, and replace it with a template argument which is
also a pack, we want to use the pack pattern, not the expanded pack.
The caller should take care of expanding the pack afterwards.
Fixes PR16646.
llvm-svn: 186713
2013-07-19 19:40:38 +00:00
Richard Smith
83c728b581
Update users manual to indicate:
...
1) clang++ must be used when linking C++ programs using -fsanitize=undefined, and
2) MSan can't be combined with TSan or ASan.
llvm-svn: 186711
2013-07-19 19:06:48 +00:00
Akira Hatanaka
0aa60efe9c
[mips] Add support for command-line options -mno-check-zero-division and
...
-mcheck-zero-division.
llvm-svn: 186710
2013-07-19 18:58:48 +00:00
Argyrios Kyrtzidis
47b1517c52
[arcmt] After checking is successful disable auto-synthesize to avoid "@synthesize of 'weak' property is only
...
allowed in ARC" errors.
rdar://14461559
llvm-svn: 186709
2013-07-19 18:57:15 +00:00
Aaron Ballman
db6d85ef92
Replace some existing type attribute diagnostics with a
...
single diagnostic that selects. No functional changes intended.
llvm-svn: 186708
2013-07-19 18:53:44 +00:00
John Thompson
cda95fe72c
Add SourceRange to PPCallbacks::Defined callback.
...
llvm-svn: 186707
2013-07-19 18:50:04 +00:00
Enea Zaffanella
25723ce6fc
Fix source range of implicitly instantiated friend declaration.
...
llvm-svn: 186702
2013-07-19 18:02:36 +00:00
Benjamin Kramer
875356ade3
Fix test to actually check things.
...
llvm-svn: 186701
2013-07-19 17:49:21 +00:00
Fariborz Jahanian
008ef72bee
Fixes an ObjC migrator crash when last decl
...
in file is an enum.
llvm-svn: 186700
2013-07-19 17:44:32 +00:00
Roman Divacky
4dcb5dbb53
This patch implements __get_cpuid_max() as an inline and __cpuid() and
...
__cpuid_count() as macros to be compatible with GCC's cpuid.h. It also adds
bit_<foo> constants for the various feature bits as described in version 039
(May 2011) of Intel's SDM Volume 2 in the description of the CPUID
instruction. The list of bit_<foo> constants is a bit exhaustive (GCC
doesn't do near this many). More bits could be added from a newer version of
SDM if desired.
Patch by John Baldwin!
llvm-svn: 186696
2013-07-19 17:28:36 +00:00
Richard Sandiford
4652d893bc
[SystemZ] Add -march= command-line option
...
llvm-svn: 186694
2013-07-19 16:51:51 +00:00
Richard Sandiford
896f8db0bd
[SystemZ] Enable frame-pointer elimination for -O1 and above
...
Copies the x86 behavior.
llvm-svn: 186674
2013-07-19 14:06:49 +00:00
Alexey Samsonov
492c7bc8ff
Revert r186672 - turns out ASan supports Mac OS 10.6 yet.
...
llvm-svn: 186673
2013-07-19 12:53:04 +00:00
Alexey Samsonov
32f071a1d6
[ASan] Reflect the dropped Mac OS 10.6 support in docs
...
llvm-svn: 186672
2013-07-19 12:33:30 +00:00
Manuel Klimek
7a698519e8
Allow clang tools to display an overview when using the CommonOptionsParser.
...
Patch by Guillaume Papin.
llvm-svn: 186671
2013-07-19 12:20:59 +00:00
Manuel Klimek
dce2347f6d
Adds overlapsWith and contains predicates on tooling::Range.
...
Patch by Guillaume Papin.
llvm-svn: 186670
2013-07-19 12:12:36 +00:00
Manuel Klimek
ba46fc01a8
Adds ctorInitializer and forEachConstructorInitializer matchers.
...
llvm-svn: 186668
2013-07-19 11:50:54 +00:00
NAKAMURA Takumi
ae74cfa911
StmtOpenMP.h: Prune a stray \param in the comment of OMPExecutableDirective(). [-Wdocumentation]
...
- /// \param Clauses A list of clauses.
llvm-svn: 186665
2013-07-19 10:31:05 +00:00
NAKAMURA Takumi
ba7131cc35
StmtOpenMP.h: Fix bogus \param(s). [-Wdocumentation]
...
llvm-svn: 186664
2013-07-19 10:30:58 +00:00
Daniel Jasper
b11c2c2838
Improve clang-format vim integration.
...
The previous line-by-line replacement causes vim to take a long time if
the foldmethod is set to 'syntax'. This should significantly improve
performance in that case.
llvm-svn: 186660
2013-07-19 09:30:44 +00:00
Timur Iskhodzhanov
03e8746f90
Simplify the CodeGenFunction::Build*Virtual*Call family of functions
...
llvm-svn: 186657
2013-07-19 08:14:45 +00:00
Craig Topper
61d01cc95e
Remove trailing whitespace.
...
llvm-svn: 186652
2013-07-19 04:46:31 +00:00
Craig Topper
ed1236d041
Remove unnecessary IsFirst variable from debug codde in GetDiagInfo.
...
llvm-svn: 186649
2013-07-19 03:59:51 +00:00
Alexey Bataev
5ec3eb11fc
OpenMP: basic support for #pragma omp parallel
...
llvm-svn: 186647
2013-07-19 03:13:43 +00:00
Fariborz Jahanian
b0057bb4fc
ObjectiveC migrator: add support to migrate to
...
NS_OPTIONS.
llvm-svn: 186641
2013-07-19 01:05:49 +00:00
Jordan Rose
e9c57229f9
[analyzer] Include analysis stack in crash traces.
...
Sample output:
0. Program arguments: ...
1. <eof> parser at end of file
2. While analyzing stack:
#0 void inlined()
#1 void test()
3. crash-trace.c:6:3: Error evaluating statement
llvm-svn: 186639
2013-07-19 00:59:08 +00:00
Eric Christopher
978c839315
Update createCompileUnit call for llvm changes.
...
llvm-svn: 186638
2013-07-19 00:51:58 +00:00
Eli Friedman
7a2eca0f0f
Fix crash-on-invalid with inheriting constructor.
...
Fixes PR16656.
llvm-svn: 186631
2013-07-18 23:59:50 +00:00
Eli Friedman
ebea0f29e2
Clean up diagnostics for inheriting constructors.
...
No new diagnostics, just better wording and notes pointing at more
relevant locations.
llvm-svn: 186629
2013-07-18 23:29:14 +00:00
Alexander Kornienko
a49732ff28
Added -lines X:Y option to specify line range to process. This is a more human-friendly alternative to -offset and -length.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D1160
llvm-svn: 186625
2013-07-18 22:54:56 +00:00
Fariborz Jahanian
85e988bbea
ObjectiveC migrator: Remove semicolon after the typedef
...
declaration when converting to NS_ENUM. This required
some code refactoring.
llvm-svn: 186619
2013-07-18 22:17:33 +00:00
Hans Wennborg
5937ec7502
Address -Wreorder warning in Driver.cpp
...
llvm-svn: 186617
2013-07-18 21:45:42 +00:00
Hans Wennborg
70850d83dc
Turn Driver::CCCIsCXX and CCCIsCPP into a single Mode enum,
...
and add a new option --driver-mode= to control it explicitly.
The CCCIsCXX and CCCIsCPP flags were non-overlapping, i.e. there
are currently really three modes that Clang can run in: gcc, g++
or cpp, so it makes sense to represent them as an enum.
Having a command line flag to control it helps testing.
llvm-svn: 186605
2013-07-18 20:29:38 +00:00
Fariborz Jahanian
92463274e6
ObjectiveC migration. migration to NS_ENUM/SN_OPTION
...
- wip.
llvm-svn: 186604
2013-07-18 20:11:45 +00:00
Reid Kleckner
61b23b7edc
[Driver] Use LLVM's response file parser because it can read UTF-16
...
MSBuild writes response files as UTF-16 little endian with a byte order
mark. With this change, clang will be able to read them, although we
still can't parse any of their flags.
Adds a UTF-16-LE response file with a BOM for testing.
Differential Revision: http://llvm-reviews.chandlerc.com/D1137
llvm-svn: 186603
2013-07-18 20:00:53 +00:00
Samuel Benzaquen
a37bb8c01a
Separate the notion of 'context' when recursing down in the parser and actual errors.
...
Summary:
Change how error messages are constructed and stored in Diagnostics.
Separate the notion of 'context' when recursing down in the parser and actual errors.
This will simplify adding some new features, like argument overloading and error recovery.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1168
llvm-svn: 186602
2013-07-18 19:47:59 +00:00
Aaron Ballman
7b590d2684
Changed declarations from Attr to InheritableAttr as they are already being processed that way semantically.
...
Patch thanks to Dean Sutherland! Reviewed by Eli Friedman.
llvm-svn: 186598
2013-07-18 19:11:29 +00:00
Aaron Ballman
c2cbc66e7a
Switching to use checkAttributeNumArgs for trivial cases. No functional changes intended.
...
llvm-svn: 186591
2013-07-18 18:01:48 +00:00
Aaron Ballman
d7b6459f80
Test contents were somehow duplicated, resulting in any testcase that fails automatically failing twice. Removing the duplicates.
...
llvm-svn: 186590
2013-07-18 17:41:26 +00:00
Aaron Ballman
f90ccb082b
Replacing a morally duplicate diagnostic by adding it to an existing diagnostic's select list. Updates the tests for the more consistent diagnostic.
...
llvm-svn: 186584
2013-07-18 14:56:42 +00:00
Daniel Jasper
998cabcff4
clang-format: Fix bad line break with pointers to members.
...
Before:
void f() {
(a->*
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(aaaa,
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb);
}
After:
void f() {
(a->*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(
aaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb);
}
Also add missing test case.
llvm-svn: 186583
2013-07-18 14:46:07 +00:00
Manuel Klimek
be0474c047
Fix crash in libclang if code completion is used with unknown flags.
...
Use CaptureDroppedDiagnostics to make sure that there is a diagnostic
client installed when warning flags are parsed.
llvm-svn: 186582
2013-07-18 14:23:12 +00:00
Aaron Ballman
8b8ebdd9dd
Removed a parameter from handleAttrWithMessage to make it more consistent with other attribute handlers, as well as other attribute error messages. Added missing test cases for the unavailable attribute, and updated the deprecated test case.
...
llvm-svn: 186578
2013-07-18 13:13:52 +00:00
JF Bastien
2a0a476e74
Fix volatile _Complex alignment test on platforms where 64-bit floating point isn't 64-bit aligned
...
Add x86-64 triple, and check its datalayout. Also add some comments, and use the new CHECK-LABEL.
llvm-svn: 186564
2013-07-18 06:11:45 +00:00
Adrian Prantl
b75016d299
s/BuiltinLocation/ArtificialLocation/
...
llvm-svn: 186557
2013-07-18 01:36:04 +00:00
Eric Christopher
f8bc4d878c
Instead of checking against some version of "isType()" go ahead and
...
use the conversion to bool to check if we've managed to get a type
that isn't default constructed - as we meant to in the first place.
llvm-svn: 186556
2013-07-18 00:52:50 +00:00
Adrian Prantl
593f10ed81
Fix a compile error caught by bb-chapuni.
...
llvm-svn: 186555
2013-07-18 00:47:12 +00:00