]>
granicus.if.org Git - clang/log
Daniel Jasper [Tue, 13 Aug 2013 08:29:26 +0000 (08:29 +0000)]
clang-format: Activate WebKit-style tests for MS compilers.
They were accidentally placed in the #if.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188255
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 13 Aug 2013 06:50:04 +0000 (06:50 +0000)]
clang-format: Slightly adapt line break penalties.
Before:
aaaaaaaaaaaaaaaaaaaaaaaa (
aaaaaaaaaaaaa (
aaaaaaaaaaaaaaaaaaaaaaaaa )
->
aaaaaaaaa ());
After:
aaaaaaaaaaaaaaaaaaaaaaaa (
aaaaaaaaaaaaa (
aaaaaaaaaaaaaaaaaaaaaaaaa )->
aaaaaaaaa ());
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188253
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 13 Aug 2013 06:32:20 +0000 (06:32 +0000)]
[-cxx-abi microsoft] Mangle __uuidof correctly into template parameters
Summary:
It seems that __uuidof introduces a global extern "C" declaration of
type __s_GUID. However, our implementation of __uuidof does not provide
such a declaration and thus must open-code the mangling for __uuidof in
template parameters.
This allows us to codegen scoped COM pointers and other such things.
This fixes PR16836.
Depends on D1356.
Reviewers: rnk, cdavis5x, rsmith
Reviewed By: rnk
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1357
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188252
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 13 Aug 2013 04:21:38 +0000 (04:21 +0000)]
Drive by cleanup
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Larisse Voufo [Tue, 13 Aug 2013 02:02:26 +0000 (02:02 +0000)]
variable templates updated for PCH serialization... Still working on test cases...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188249
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 13 Aug 2013 01:53:21 +0000 (01:53 +0000)]
AnalysisBasedWarnings.cpp:: Prune "\param VariableName", possibly copypasto, in comments. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188248
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 13 Aug 2013 01:25:35 +0000 (01:25 +0000)]
[-cxx-abi microsoft] Mangle TemplateArgument::Declaration for references
Summary:
Properly mangle declarations showing up in template arguments that are
reference parameters. Fun-fact: undname cannot handle these!
Reviewers: rnk, cdavis5x
Reviewed By: rnk
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1356
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 13 Aug 2013 00:11:59 +0000 (00:11 +0000)]
Silence a warning from MSVC about not returning a value
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188237
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 12 Aug 2013 23:49:39 +0000 (23:49 +0000)]
Remove Sema includes from Analysis code to fix layering
This moves a header-only class from Sema to Analysis and puts the option
check in Sema.
Patch by Chris Wailes!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188230
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 12 Aug 2013 23:26:25 +0000 (23:26 +0000)]
clang-cl: Sink /Fe and /Fo diagnostic code into BuildActions
Differential Revision: http://llvm-reviews.chandlerc.com/D1370
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188226
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 12 Aug 2013 23:17:13 +0000 (23:17 +0000)]
ObjectiveC migration. Add couple of routine
, currently unused, for future cf-annotation work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188224
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 12 Aug 2013 23:14:36 +0000 (23:14 +0000)]
DebugInfo: Simplify declaration building code - relying on the limit debug info checking already in CreateType(RecordType)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188222
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 12 Aug 2013 22:24:20 +0000 (22:24 +0000)]
DebugInfo: simplify some limited/declaration creation APIs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188214
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 12 Aug 2013 22:19:13 +0000 (22:19 +0000)]
clang-cl: Consolidate tests for /Fo and /Fe into cl-outputs.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Mon, 12 Aug 2013 22:11:14 +0000 (22:11 +0000)]
Add hooks to ExternalSemaSource for after-the-fact diagnosis of
incomplete types, courtesy of Luke Zarko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 12 Aug 2013 22:02:09 +0000 (22:02 +0000)]
Speculative build fix for r188206.
The cmake-clang-x86_64 was upset:
error: 'template<class ImplClass, class RetTy> class clang::ConstStmtVisitor' used without template parameters
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 12 Aug 2013 21:56:42 +0000 (21:56 +0000)]
clang-cl: Support the /Fe option
This is used to name the linked output file.
Differential Revision: http://llvm-reviews.chandlerc.com/D1344
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 12 Aug 2013 21:54:04 +0000 (21:54 +0000)]
Fix pretty-printing for unnamed unions.
This is just a couple of minor fixes to account for the existence
of ElaboratedType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188209
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 12 Aug 2013 21:54:01 +0000 (21:54 +0000)]
Fix crash w/BlockDecl and invalid qualified decl.
I'm not really satisfied with the ad-hoc nature of
Sema::diagnoseQualifiedDeclaration, but I'm not sure how to fix it.
Fixes <rdar://problem/
14639501 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188208
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Mon, 12 Aug 2013 21:20:55 +0000 (21:20 +0000)]
Patch by Chris Wailes <chris.wailes@gmail.com>.
Reviewed by delesley, dblaikie.
Add the annotations and code needed to support a basic 'consumed' analysis.
Summary:
This new analysis is based on academic literature on linear types. It tracks
the state of a value, either as unconsumed, consumed, or unknown. Methods are
then annotated as CallableWhenUnconsumed, and when an annotated method is
called while the value is in the 'consumed' state a warning is issued. A value
may be tested in the conditional statement of an if-statement; when this occurs
we know the state of the value in the different branches, and this information
is added to our analysis. The code is still highly experimental, and the names
of annotations or the algorithm may be subject to change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188206
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Mon, 12 Aug 2013 19:57:06 +0000 (19:57 +0000)]
Forgot to add unittests/Sema/ before committing r188196 :(
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Mon, 12 Aug 2013 19:54:38 +0000 (19:54 +0000)]
Add hooks for typo correction to ExternalSemaSource, courtesy of Luke Zarko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 12 Aug 2013 18:34:17 +0000 (18:34 +0000)]
clang-cl: Expand warning about /TC and /TP override, and expand test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Mon, 12 Aug 2013 17:20:29 +0000 (17:20 +0000)]
[Mips] MSA frontend option support
This patch adds -mmsa and -mno-msa to the options supported by
clang to enable and disable support for MSA.
When MSA is enabled, a predefined macro '__mips_msa' is defined to 1.
Patch by Daniel Sanders
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 12 Aug 2013 16:29:25 +0000 (16:29 +0000)]
This test passes on freebsd after r188178. Not exactly sure why.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 12 Aug 2013 13:46:52 +0000 (13:46 +0000)]
SourceManager intialization tweaks.
- Open files before calling stat on them.
- Go through FileManager for getting the buffer of named pipes. It has the
necessary plumbing to deal with "volatile" files.
- Print the cause when stdin reading fails. The only case I can imagine where
this happens is when stdin is wired to a device file, so no test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 12 Aug 2013 12:58:05 +0000 (12:58 +0000)]
clang-format: Improve stream-formatting.
Before:
CHECK(controller->WriteProto(FLAGS_row_key, FLAGS_proto)) << "\""
<< FLAGS_proto
<< "\"";
After:
SemaRef.Diag(Loc, diag::note_for_range_begin_end)
<< BEF << IsTemplate << Description << E->getType();
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 12 Aug 2013 12:51:05 +0000 (12:51 +0000)]
Fix FileCheck --check-prefix lines.
Various tests had sprung up over the years which had --check-prefix=ABC on the
RUN line, but "CHECK-ABC:" later on. This happened to work before, but was
strictly incorrect. FileCheck is getting stricter soon though.
Patch by Ron Ofir.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 12 Aug 2013 12:16:34 +0000 (12:16 +0000)]
clang-format: Correctly format alias declarations.
Before:
template <class CallbackClass>
using MyCallback = void(CallbackClass::*)(SomeObject * Data);");
After:
template <class CallbackClass>
using MyCallback = void (CallbackClass::*)(SomeObject *Data);");
Also fix three wrong indentations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 12 Aug 2013 11:48:05 +0000 (11:48 +0000)]
Use new llvm::SpecialCaseList API in CodeGenModule
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Mon, 12 Aug 2013 03:51:17 +0000 (03:51 +0000)]
This change fixes the formatting of statements such as catch (E& e).
Previously these were formatting as catch (E & e) because the inner parenthesis
was being marked as an expression.
Patch by Thomas Gibson-Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 12 Aug 2013 02:53:18 +0000 (02:53 +0000)]
Fix misindentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188151
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Wilhelm [Sat, 10 Aug 2013 13:29:01 +0000 (13:29 +0000)]
Omit llvm:: before StringRef and SmallString. We have using directive in include/clang/Basic/LLVM.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Wilhelm [Sat, 10 Aug 2013 12:33:24 +0000 (12:33 +0000)]
Omit llvm:: before SmallVector and SmallVectorImpl. We have using directive in include/clang/Basic/LLVM.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Sat, 10 Aug 2013 12:00:21 +0000 (12:00 +0000)]
Fix to PR16225 (Assert-on-invalid: isa<LabelDecl>(D) && "declaration not instantiated in this scope")
Differential Revision: http://llvm-reviews.chandlerc.com/D920
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Enea Zaffanella [Sat, 10 Aug 2013 07:24:53 +0000 (07:24 +0000)]
Added source locs for angled parentheses in class/var template partial specs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Sat, 10 Aug 2013 05:54:47 +0000 (05:54 +0000)]
Avoid spurious error messages if parent template class cannot be instantiated
Differential Revision: http://llvm-reviews.chandlerc.com/D924
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 10 Aug 2013 04:25:53 +0000 (04:25 +0000)]
Fix warning in builds without asserts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 10 Aug 2013 01:40:10 +0000 (01:40 +0000)]
Simplify now that llvm::sys::current_path checks $PWD.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188128
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Sat, 10 Aug 2013 01:24:35 +0000 (01:24 +0000)]
[analyzer] Update Open Projects and Potential Checkers pages.
- va_list checker (PR16811 and PR16812)
- Model floating-point values
- Bound bitwise masking operations (PR16615)
- Bound C string length (PR16558 and others)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188127
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 10 Aug 2013 00:59:43 +0000 (00:59 +0000)]
clang/test/Driver/cl-options.c: Suppress this on cygming due to -fno-builtin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 9 Aug 2013 23:37:05 +0000 (23:37 +0000)]
Correctly profile CXXPseudoDestructorExprs.
CXXPseudoDestructorExprs may not contain a type. PR16852.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188123
91177308 -0d34-0410-b5e6-
96231b3b80d8
James Dennett [Fri, 9 Aug 2013 23:08:25 +0000 (23:08 +0000)]
Expose LambdaIntroducer::DefaultLoc in the AST's LambdaExpr.
Summary:
Source-centric tools need access to the location of a C++11
lambda expression's capture-default ('&' or '=') when it's present.
It's possible for them to find it by re-lexing and re-implementing
rules that Clang's parser has already applied, but the cost of storing
the SourceLocation and making it available to them is 32 bits per
LambdaExpr (a small delta, proportionally), and the simplification in
client code is significant.
Reviewers: rsmith
Reviewed By: rsmith
CC: cfe-commits, klimek, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1192
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188121
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 9 Aug 2013 22:52:48 +0000 (22:52 +0000)]
Fix typo in template diffing docs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 9 Aug 2013 21:42:32 +0000 (21:42 +0000)]
Fix for PR16570: when comparing two function pointers, discard qualifiers when
comparing non-reference function parameters. The qualifiers don't matter for
comparisons.
This is a re-commit of r187769, which was accidentially reverted in r187770,
with a simplification at the suggestion of Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 9 Aug 2013 20:20:25 +0000 (20:20 +0000)]
[arcmt] When handling unbridged casts, handle the body of BlockDecl separately because ParentMap does not record
Stmt parent nodes inside a BlockDecl.
Fixes rdar://
14686900
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Wilhelm [Fri, 9 Aug 2013 18:02:13 +0000 (18:02 +0000)]
Omit llvm:: before ArrayRef, as we have using llvm::ArrayRef in include/clang/Basic/LLVM.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 9 Aug 2013 17:51:03 +0000 (17:51 +0000)]
Remove "static" on simple temporary StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 9 Aug 2013 17:38:42 +0000 (17:38 +0000)]
clang-cl: Don't pass /defaultlib to the linker
Since r187945, clang-cl will add the runtime library dependency to
the .obj file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188086
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 9 Aug 2013 17:20:05 +0000 (17:20 +0000)]
Only emit debug info for implicit members that actually get codegen, not just ODR use.
This includes special members (copy/default ctor, copy assign, default
ctor) and template specializations for member function templates.
Good for a 5% decrease (1.80 to 1.71 GB) in size on Clang+LLVM's .dwo
files (when using fission).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 9 Aug 2013 17:17:48 +0000 (17:17 +0000)]
Add a convenient way to compare GCCVersions without creating temporary objects.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 9 Aug 2013 17:17:42 +0000 (17:17 +0000)]
DirectIvarAssignment: Replace vtable'd objects with simple functions.
Avoids unnecessary static constructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 9 Aug 2013 14:43:04 +0000 (14:43 +0000)]
[tests] Update to use lit_config and lit package, as appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 9 Aug 2013 10:56:42 +0000 (10:56 +0000)]
Fixup for r188058: assume hasAsanZeroBaseShadow() is false if ASan is not needed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 9 Aug 2013 10:12:30 +0000 (10:12 +0000)]
Add lrint to the list of math builtins. It never sets errno so we can mark it as readnone.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 9 Aug 2013 09:39:17 +0000 (09:39 +0000)]
Put back a microoptimization with a comment to make it more obvious.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188063
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 9 Aug 2013 08:56:20 +0000 (08:56 +0000)]
Sema: Assertion failure during CodeGen in CodeGenModule::EmitUuidofInitializer
Make sure we can properly generate code when the UUID has curly braces
on it, strip the curly braces at the sema layer.
This fixes PR16813.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188061
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 9 Aug 2013 08:35:59 +0000 (08:35 +0000)]
[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section
Revert r188055 which reverted r188053. An unrelated change previously snuck in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Fri, 9 Aug 2013 07:46:29 +0000 (07:46 +0000)]
[analyzer] Enable usage of temporaries in InitListExprs
Summary:
ExprEngine had code which specificaly disabled using CXXTempObjectRegions in
InitListExprs. This was a hack put in r168757 to silence a false positive.
The underlying problem seems to have been fixed in the mean time, as removing
this code doesn't seem to break anything. Therefore I propose to remove it and
solve PR16629 in the process.
Reviewers: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1325
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 9 Aug 2013 07:42:13 +0000 (07:42 +0000)]
Make SanitizerArgs parsing toolchain-independent
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188058
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Fri, 9 Aug 2013 06:35:06 +0000 (06:35 +0000)]
Use isCharInSet from llvm/Support/UnicodeCharRanges.h, added a test for double-width characters in FixIt-hints.
Summary: This is a follow-up to r187837.
Reviewers: gribozavr, jordan_rose
Reviewed By: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1306
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188056
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 9 Aug 2013 05:56:24 +0000 (05:56 +0000)]
Revert "[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section"
This commit reverts r188053.
It is breaking the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188055
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 9 Aug 2013 05:09:04 +0000 (05:09 +0000)]
[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section
We mangled them like:
L___uuid_12345678-1234-1234-1234-
123456789abc
We should've mangled them like:
__GUID_12345678_1234_1234_1234_123456789abc
Furthermore, they are external symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 9 Aug 2013 04:35:01 +0000 (04:35 +0000)]
Implement [class.friend]p11's special name lookup rules for friend declarations
of local classes. We were previously handling this by performing qualified
lookup within a function declaration(!!); replace it with the proper scope
lookup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188050
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 9 Aug 2013 00:55:47 +0000 (00:55 +0000)]
[analyzer] Warn when using 'delete' on an uninitialized variable.
Patch by Karthik Bhat, modified slightly by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 9 Aug 2013 00:45:18 +0000 (00:45 +0000)]
[tests] Make string encoding issues explicit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188042
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 9 Aug 2013 00:44:59 +0000 (00:44 +0000)]
[tests] Avoid deprecated except syntax.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 9 Aug 2013 00:32:23 +0000 (00:32 +0000)]
clang-cl: Support /showIncludes
This option prints information about #included files to stderr. Clang could
already do it, this patch just teaches the existing code about the /showIncludes
style and adds the flag.
Differential Revision: http://llvm-reviews.chandlerc.com/D1333
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 8 Aug 2013 23:44:01 +0000 (23:44 +0000)]
clang-cl: Map /Oi[-] to -f[no-]builtin
Differential Revision: http://llvm-reviews.chandlerc.com/D1328
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 8 Aug 2013 21:51:06 +0000 (21:51 +0000)]
unbreak buildbot on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188018
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 8 Aug 2013 21:20:01 +0000 (21:20 +0000)]
ObjectiveC migrator: tighten rule about when to
migrate to @property with getter name starting with
'is'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 8 Aug 2013 20:51:58 +0000 (20:51 +0000)]
ObjectiveC migration: Handle another special case of
setter/getter methods which can be migrated to
a @property.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 8 Aug 2013 19:54:30 +0000 (19:54 +0000)]
clang-cl: use MS C++ ABI
Differential Revision: http://llvm-reviews.chandlerc.com/D1329
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 8 Aug 2013 19:53:46 +0000 (19:53 +0000)]
Fix alignof computation of large arrays on x86_64.
We were exposing the extra alignment given to large arrays. The new behavior
matches gcc, which is a good thing since this is a gcc extension.
Thanks to Joerg Sonnenberger for noticing it.
While at it, centralize the method description in the .h file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187999
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 8 Aug 2013 19:33:10 +0000 (19:33 +0000)]
Revert "clang-cl: Hook up /Za to prevent adding oldnames.lib dependency"
This reverts commit r187991 and adjusts the comment. /Za is much more
involved, and we don't want to give anyone the impression we actually
support it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Stefanus Du Toit [Thu, 8 Aug 2013 17:48:14 +0000 (17:48 +0000)]
Add clang_Location_isFromMainFile() to libclang.
Also bump the minor version number and update libclang.exports.
Reviewed by: Dmitri Gribenko, Doug Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187994
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 8 Aug 2013 17:34:27 +0000 (17:34 +0000)]
Remove misleading comment about using cc1 option table.
There hasn't been a separate cc1 option table since r155916.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187993
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 8 Aug 2013 16:54:31 +0000 (16:54 +0000)]
clang-cl: Hook up /Za to prevent adding oldnames.lib dependency
The /Za flag should probably do more, but let's start with this.
Differential Revision: http://llvm-reviews.chandlerc.com/D1320
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187991
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Thu, 8 Aug 2013 16:06:26 +0000 (16:06 +0000)]
scan-build: pass -target through to analyzer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edwin Vane [Thu, 8 Aug 2013 13:31:14 +0000 (13:31 +0000)]
Introduce Replacement deduplication and conflict detection function
Summary:
This patch adds tooling::deduplicate() which removes duplicates from and
looks for conflicts in a vector of Replacements.
Differential Revision: http://llvm-reviews.chandlerc.com/D1314
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187979
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 8 Aug 2013 11:32:17 +0000 (11:32 +0000)]
Factor out parsing sanitizer arguments to a separate function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 8 Aug 2013 11:08:26 +0000 (11:08 +0000)]
Remove unused variable. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 8 Aug 2013 10:11:02 +0000 (10:11 +0000)]
Move SanitizerArgs implementation from .h to .cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187972
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 8 Aug 2013 08:34:35 +0000 (08:34 +0000)]
The only useful loop unrolling flag to give realistically is
'-fno-unroll-loops'. The option to the backend is even called
'DisableUnrollLoops'. This is precisely the form that Clang *didn't*
support. We didn't recognize the flag, we didn't pass it to the CC1
layer, and even if we did we wouldn't use it. Clang only inspected the
positive form of the flag, and only did so to enable loop unrolling when
the optimization level wasn't high enough. This only occurs for an
optimization level that even has a chance of running the loop unroller
when optimizing for size.
This commit wires up the 'no' variant, and switches the code to actually
follow the standard flag pattern of using the last flag and allowing
a flag in either direction to override the default.
I think this is still wrong. I don't know why we disable the loop
unroller entirely *from Clang* when optimizing for size, as the loop
unrolling pass *already has special logic* for the case where the
function is attributed as optimized for size! We should really be
trusting that. Maybe in a follow-up patch, I don't really want to change
behavior here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Thu, 8 Aug 2013 03:05:52 +0000 (03:05 +0000)]
Split the deprecated increment bool warning into a sub-group of -Wdeprecated
so that it can be toggled independently of other deprecated warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 8 Aug 2013 02:19:56 +0000 (02:19 +0000)]
Revert r187935 "Support for double width characters."
It broke a public build bot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Thu, 8 Aug 2013 01:50:23 +0000 (01:50 +0000)]
Emit an error for enum increments and decrements in C++ mode.
Fixes PR16394.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Thu, 8 Aug 2013 01:24:29 +0000 (01:24 +0000)]
catch-undefined-behavior.cpp: Remove names that don't appear in every build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187952
91177308 -0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Thu, 8 Aug 2013 01:18:31 +0000 (01:18 +0000)]
UBSan: Fix naming for IR variables in catch-undef-behavior.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187951
91177308 -0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Thu, 8 Aug 2013 01:08:17 +0000 (01:08 +0000)]
UBSan: Fix alignment checks emitted in downcasts.
Summary:
UBSan was checking for alignment of the derived class on the pointer to
the base class, before converting. With some class hierarchies, this could
generate false positives.
Added test-case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187948
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 8 Aug 2013 00:17:41 +0000 (00:17 +0000)]
clang-cl: Support the run-time selection options (/MD, /MT et al.)
These flags set some preprocessor macros and injects a dependency
on the runtime library into the object file, which later is picked up
by the linker.
This also adds a new CC1 flag for adding a dependent library.
Differential Revision: http://llvm-reviews.chandlerc.com/D1315
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187945
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 7 Aug 2013 23:29:01 +0000 (23:29 +0000)]
Support for double width characters.
Summary: Only works for UTF-8-encoded files.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1311
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187935
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 7 Aug 2013 22:47:34 +0000 (22:47 +0000)]
DataFlowSanitizer; Clang changes.
DataFlowSanitizer is a generalised dynamic data flow analysis.
Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own. Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.
Differential Revision: http://llvm-reviews.chandlerc.com/D966
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187925
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 7 Aug 2013 22:34:01 +0000 (22:34 +0000)]
Fix doxygen function name mismatch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 7 Aug 2013 21:41:30 +0000 (21:41 +0000)]
PR9992: Serialize and deserialize the token sequence for a function template in
-fdelayed-template-parsing mode. Patch by Will Wilson!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187916
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 7 Aug 2013 21:17:33 +0000 (21:17 +0000)]
[PCH] Fix a PCH serialization crash, with invalid code related to forward enum references.
The problem was that an enum without closing semicolon could be associated as a forward enum
in an erroneous declaration, leading to the identifier being associated with the enum decl but
without a declaration actually referencing it.
This resulted in not having it serialized before serializing the identifier that is associated with.
Also prevent the ASTUnit from querying the serialized DeclID for an invalid top-level decl; it may not
have been serialized.
rdar://
14539667
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187914
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Wed, 7 Aug 2013 19:20:45 +0000 (19:20 +0000)]
Fixes a couple of bugs with the Allman brace breaking.
In particular, left braces after an enum declaration now occur on their
own line. Further, when short ifs/whiles are allowed these no longer
cause the left brace to be on the same line as the if/while when a
brace is included.
Patch by Thomas Gibson-Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187901
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 7 Aug 2013 18:08:19 +0000 (18:08 +0000)]
Correctly allign arrays on 32 bit systems.
Before this patch we would align
long long int big[1024];
to 4 bytes on 32 bit systems. The problem is that we were only looking
at the element type when getLargeArrayMinWidth returned non zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187897
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 7 Aug 2013 16:40:29 +0000 (16:40 +0000)]
Patch to fix doxygen trailing comments for ObjectiveC methods.
// rdar://
14258334
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187893
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 7 Aug 2013 16:29:23 +0000 (16:29 +0000)]
clang-format: Fix corner case in OpenMP pragma formatting.
Before:
#pragma omp reduction( | : var)
After:
#pragma omp reduction(| : var)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187892
91177308 -0d34-0410-b5e6-
96231b3b80d8