]>
granicus.if.org Git - clang/log
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
Jordan Rose [Wed, 7 Aug 2013 16:16:48 +0000 (16:16 +0000)]
Eliminate CXXConstructorDecl::IsImplicitlyDefined.
This field is just IsDefaulted && !IsDeleted; in all places it's used,
a simple check for isDefaulted() is superior anyway, and we were forgetting
to set it in a few cases.
Also eliminate CXXDestructorDecl::IsImplicitlyDefined, for the same reasons.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187891
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 7 Aug 2013 12:54:47 +0000 (12:54 +0000)]
Indicate success for simple options when clang called with -cc1.
Patch by David Wiberg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187888
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 7 Aug 2013 08:23:32 +0000 (08:23 +0000)]
Documentation for sanitizer special case list format and -f(no-)?sanitize-blacklist flag
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 7 Aug 2013 05:34:02 +0000 (05:34 +0000)]
clang-format: Improve formatting of builder-type calls.
This removes a formatting choice that was added at one point, but is
not generally liked by users. Specifically, in builder-type calls, do
(easily) break if the object before the ./-> is either a field or a
parameter-less function call. I.e., don't break after "aa.aa.aa" or
"aa.aa.aa()". In general, these sequences in builder-type calls are
seen as a single entity and thus breaking them up is a bad idea.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187865
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 7 Aug 2013 00:32:15 +0000 (00:32 +0000)]
clang-cl: Use .obj as object file extension instead of .o
Differential Revision: http://llvm-reviews.chandlerc.com/D1302
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187840
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 6 Aug 2013 23:29:00 +0000 (23:29 +0000)]
Patch to fix doxygen trailing comments for ObjectiveC properties.
// rdar://
14258334
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187835
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 6 Aug 2013 22:11:28 +0000 (22:11 +0000)]
clang-cl: Implement support for the /Fo option
This implements support for the /Fo option, which is used
to set the filename or output dir for object files.
Differential Revision: http://llvm-reviews.chandlerc.com/D1302
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187820
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Tue, 6 Aug 2013 21:31:54 +0000 (21:31 +0000)]
Add a new warning to -Wloop-analysis to detect suspicious increments or
decrements inside for loops. Idea for this warning proposed in PR15636:
http://llvm.org/bugs/show_bug.cgi?id=15636
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 6 Aug 2013 18:06:23 +0000 (18:06 +0000)]
ObjectiveC migration: tweak setting of lifetime attribute
on @property migration. Don't set unsafe_unretained
on non-object properties. Set 'retain' on strong
properties. Makecertain properties with specific
names unsafe_unretained as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187810
91177308 -0d34-0410-b5e6-
96231b3b80d8
Larisse Voufo [Tue, 6 Aug 2013 07:37:09 +0000 (07:37 +0000)]
Update status of support for variable templates on website.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187785
91177308 -0d34-0410-b5e6-
96231b3b80d8
Larisse Voufo [Tue, 6 Aug 2013 07:33:00 +0000 (07:33 +0000)]
A bit of clean up based on peer's feedback...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187784
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 6 Aug 2013 07:09:20 +0000 (07:09 +0000)]
PR16755: When initializing or modifying a bitfield member in a constant
expression, truncate the stored value to the size of the bitfield.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187782
91177308 -0d34-0410-b5e6-
96231b3b80d8
Larisse Voufo [Tue, 6 Aug 2013 05:49:26 +0000 (05:49 +0000)]
Removed hack that was used to properly restore the nested name specifier of qualified variable template ids. It turns out that the current implementation was just not logical setup for it. This commit has made it so.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Larisse Voufo [Tue, 6 Aug 2013 03:57:41 +0000 (03:57 +0000)]
Fixing commit r187768: Moved diagnosis of forward declarations of variable templates from Parser to Sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Tue, 6 Aug 2013 03:44:10 +0000 (03:44 +0000)]
Fix for PR16570: when comparing two function pointers, discard qualifiers when
comparing non-reference function parameters. The qualifiers don't matter for
comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Larisse Voufo [Tue, 6 Aug 2013 03:43:07 +0000 (03:43 +0000)]
Moved diagnosis of forward declarations of variable templates from Parser to Sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187768
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 6 Aug 2013 03:31:55 +0000 (03:31 +0000)]
clang/test/Driver/crash-report.c: Mark it as XFAIL:mingw32, for now. Investigating.
I met a message, "fatal error: file 'nul' modified since it was first processed".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187767
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 6 Aug 2013 03:29:01 +0000 (03:29 +0000)]
AST/DeclTemplate.h: Possibly fix a warning. [-Wuninitialized]
FIXME: Would '0' be an appropriate value in SequenceNumber?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187766
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 6 Aug 2013 03:28:54 +0000 (03:28 +0000)]
SemaTemplateInstantiateDecl.cpp: Suppress a warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187765
91177308 -0d34-0410-b5e6-
96231b3b80d8
Larisse Voufo [Tue, 6 Aug 2013 01:03:05 +0000 (01:03 +0000)]
Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 6 Aug 2013 00:20:31 +0000 (00:20 +0000)]
clang-cl: Implement the /Tc, /TC, /Tp and /TP options.
These are used to specify source files, and whether to treat source
files as C or C++.
Differential Revision: http://llvm-reviews.chandlerc.com/D1290
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187760
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 5 Aug 2013 22:43:06 +0000 (22:43 +0000)]
[ms-cxxabi] Properly mangle member pointers
There were three things missing from the original implementation:
- We would omit the 'E' qualifier for members int 64-bit mode.
- We would not exmaine the qualifiers in 'IsMember' mode.
- We didn't generate the correct backref to the base class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187753
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 5 Aug 2013 22:26:46 +0000 (22:26 +0000)]
[ms-cxxabi] Handle template-template arguments
Template-template arguments appear to be a rather simple encoding of the
template's templated tag type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187751
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 5 Aug 2013 21:33:59 +0000 (21:33 +0000)]
[ms-cxxabi] Mangle nullptr template arguments
MSVC mangles nullptr template arguments identically to zero literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187741
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 5 Aug 2013 20:26:17 +0000 (20:26 +0000)]
Add option to disable module loading.
This patch was created by Lawrence Crowl and reviewed in:
http://llvm-reviews.chandlerc.com/D963
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187738
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 5 Aug 2013 20:14:43 +0000 (20:14 +0000)]
lit.cfg: better check for MSYS
When running the tests under Cygwin using non-Cygwin python,
the platform would be Windows and there would be bash on the path,
so this check for MSYS would not work correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 5 Aug 2013 18:49:43 +0000 (18:49 +0000)]
Implement C++'s restrictions on the type of an expression passed to a vararg
function: it can't be 'void' and it can't be an initializer list. We give a
hard error for these rather than treating them as undefined behavior (we can
and probably should do the same for non-POD types in C++11, but as of this
change we don't).
Slightly rework the checking of variadic arguments in a function with a format
attribute to ensure that certain kinds of format string problem (non-literal
string, too many/too few arguments, ...) don't suppress this error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Mon, 5 Aug 2013 18:38:16 +0000 (18:38 +0000)]
Regression test for PR12699
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 5 Aug 2013 16:02:02 +0000 (16:02 +0000)]
[analyzer] Clarify that r187624 is a hack and should be fixed better later.
Tracked by <rdar://problem/
14648821 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187729
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 5 Aug 2013 06:17:21 +0000 (06:17 +0000)]
Use a shuffle with undef elements instead of inserting 0s in the 128-bit to 256-bit casting intrinsics to improve performance. Thanks to Katya Romanova for identifying this issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187716
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 5 Aug 2013 04:53:41 +0000 (04:53 +0000)]
Sema: Don't assume a nested name specifier holds a type
Sema::PerformObjectMemberConversion assumed that the Qualifier it was
given holds a type. However, the specifier could hold just a namespace.
In this case, we should ignore the qualifier and not attempt to cast to
it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187715
91177308 -0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Sun, 4 Aug 2013 17:30:04 +0000 (17:30 +0000)]
Emit the constructor for abstract classes when using -cxx-abi microsoft, fixes PR16735
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 3 Aug 2013 17:40:38 +0000 (17:40 +0000)]
Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187694
91177308 -0d34-0410-b5e6-
96231b3b80d8