]> granicus.if.org Git - clang/log
clang
10 years agoMinor formatting cleanups -- no functional changes intended.
Aaron Ballman [Wed, 16 Apr 2014 13:16:19 +0000 (13:16 +0000)]
Minor formatting cleanups -- no functional changes intended.

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

10 years agoclang-format: Add special case to reduce indentaiton in streams.
Daniel Jasper [Wed, 16 Apr 2014 12:26:54 +0000 (12:26 +0000)]
clang-format: Add special case to reduce indentaiton in streams.

This is similar to how we treat assignments and seems to be generally
desirable.

Before:
  llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                      aaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                      aaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
  llvm::errs() << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

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

10 years agoAdding a move constructor (due to CopyOnWriteVector requiring move-only semantics...
Aaron Ballman [Wed, 16 Apr 2014 11:09:33 +0000 (11:09 +0000)]
Adding a move constructor (due to CopyOnWriteVector requiring move-only semantics) to appease MSVC.

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

10 years agoHopefully avoid a warning on some GCCs (but not all strangely,
Chandler Carruth [Wed, 16 Apr 2014 11:04:33 +0000 (11:04 +0000)]
Hopefully avoid a warning on some GCCs (but not all strangely,
preventing me from seeing it initially). GCC doesn't use the unused
attribute on members for anything, so while it works to suppress Clang's
warning for an unused private member, it adds a GCC warning for the
attribute. =/ Silence Clang's warning with a void cast in the
constructor instead which doesn't trigger any complaints from GCC.

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

10 years agoSema: Factor out argument range checks for builtin functions
Richard Sandiford [Wed, 16 Apr 2014 08:47:51 +0000 (08:47 +0000)]
Sema: Factor out argument range checks for builtin functions

No behavioural change intended.

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

10 years agoRe-enable several builtins in non-gnu modes.
Evgeniy Stepanov [Wed, 16 Apr 2014 08:06:33 +0000 (08:06 +0000)]
Re-enable several builtins in non-gnu modes.

This is a partial revert of 183015.
By not recognizing things like _setjmp we lose (returns_twice) attribute on
them, which leads to incorrect code generation.
Fixes PR16138.

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

10 years ago-Wunreachable-code: refine recognition of unreachable "sigil" to cope with implicit...
Ted Kremenek [Wed, 16 Apr 2014 07:26:09 +0000 (07:26 +0000)]
-Wunreachable-code: refine recognition of unreachable "sigil" to cope with implicit casts in C++.

Fixes <rdar://problem/16631033>.

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

10 years agoLex: Fix __has_feature(cxx_exceptions) for objective C++
Justin Bogner [Wed, 16 Apr 2014 02:56:48 +0000 (02:56 +0000)]
Lex: Fix __has_feature(cxx_exceptions) for objective C++

At one point, -fexceptions was a synonym for -fcxx-exceptions. While
the driver options still enables cxx-exceptions by default, the cc1
flag is purely about exception tables and this doesn't account for
objective C exceptions. Because of this, checking for the
cxx_exceptions feature in objective C++ often gives the wrong answer.

The cxx_exceptions feature should be based on the -fcxx-exceptions cc1
flag, not -fexceptions. Furthermore, at some point the tests were
changed to use cc1 even though they were testing the driver behaviour.
We're better off testing both the driver and cc1 here.

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

10 years agothreadSafety::SExprBuilder::BlockInfo: Non-static member initializer is unavailable...
NAKAMURA Takumi [Wed, 16 Apr 2014 01:22:22 +0000 (01:22 +0000)]
threadSafety::SExprBuilder::BlockInfo: Non-static member initializer is unavailable. Use default constructor instead.

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

10 years agoReformat.
NAKAMURA Takumi [Wed, 16 Apr 2014 01:22:07 +0000 (01:22 +0000)]
Reformat.

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

10 years agothreadSafety::CopyOnWriteVector: Use LLVM_DELETED_FUNCTION here due to missing functi...
NAKAMURA Takumi [Wed, 16 Apr 2014 01:21:53 +0000 (01:21 +0000)]
threadSafety::CopyOnWriteVector: Use LLVM_DELETED_FUNCTION here due to missing functionality of msc17.

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

10 years agoFixed problem with exclude header. The exclude header argument needs to be relative...
John Thompson [Wed, 16 Apr 2014 00:07:06 +0000 (00:07 +0000)]
Fixed problem with exclude header. The exclude header argument needs to be relative to the module.map file.

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

10 years agoFix build after r206338
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 23:58:06 +0000 (23:58 +0000)]
Fix build after r206338

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

10 years agoMake -Wabsolute-value C++-aware.
Richard Trieu [Tue, 15 Apr 2014 23:47:53 +0000 (23:47 +0000)]
Make -Wabsolute-value C++-aware.

Warn on std::abs() with unsigned argument.
Suggest std::abs as replacement for the C absolute value functions.
Suggest C++ headers if the specific std::abs overload is not found.

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

10 years agoFormat.cpp: Don't use initializer list.
NAKAMURA Takumi [Tue, 15 Apr 2014 23:29:04 +0000 (23:29 +0000)]
Format.cpp: Don't use initializer list.

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

10 years agoThread Safety Analysis: rewrite SSA pass to use the new SExpr and CFG
DeLesley Hutchins [Tue, 15 Apr 2014 23:23:19 +0000 (23:23 +0000)]
Thread Safety Analysis: rewrite SSA pass to use the new SExpr and CFG
traversal system.  The new pass is still undergoing testing; no change in
functionality.

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

10 years ago[Allocator] Make the ContentCache object actually carry the 8-byte
Chandler Carruth [Tue, 15 Apr 2014 21:34:12 +0000 (21:34 +0000)]
[Allocator] Make the ContentCache object actually carry the 8-byte
alignment constraint rather than using the allocator function's over
alignment "feature". This was the only use of the "feature" which I plan
to remove next. =] Attaching the alignment to the type seems cleaner and
more principled anyways.

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

10 years agoCodeGen: Emit warnings for out of date profile data during PGO
Justin Bogner [Tue, 15 Apr 2014 21:22:35 +0000 (21:22 +0000)]
CodeGen: Emit warnings for out of date profile data during PGO

This adds a warning that triggers when profile data doesn't match for
the source that's being compiled with -fprofile-instr-use=. This fires
only once per translation unit, as warning on every mismatched
function would be quite noisy.

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

10 years agoCodeGen: Remove a comment that isn't in the right place
Justin Bogner [Tue, 15 Apr 2014 20:37:41 +0000 (20:37 +0000)]
CodeGen: Remove a comment that isn't in the right place

This comment also appears elsewhere where it actually makes sense, and
it's just confusing here.

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

10 years agoMove comment back to being next to the thing it's describing.
Richard Smith [Tue, 15 Apr 2014 20:27:15 +0000 (20:27 +0000)]
Move comment back to being next to the thing it's describing.

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

10 years agoAST: Respect alignment attributes on typedef'd arrays
Justin Bogner [Tue, 15 Apr 2014 20:12:41 +0000 (20:12 +0000)]
AST: Respect alignment attributes on typedef'd arrays

When instantiating an array that has an alignment attribute on it, we
were looking through the array type and only considering the element
type for the resulting alignment. We need to make sure we take the
array's requirements into account too.

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

10 years ago[ARM64] Update tests to reflect the change of the default CPU in llvm.
Quentin Colombet [Tue, 15 Apr 2014 19:09:58 +0000 (19:09 +0000)]
[ARM64] Update tests to reflect the change of the default CPU in llvm.

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

10 years agoHonour -ivfsoverlay in ASTUnit to match clang
Ben Langmuir [Tue, 15 Apr 2014 18:16:25 +0000 (18:16 +0000)]
Honour -ivfsoverlay in ASTUnit to match clang

This allows code indexing, etc. to use the VFS in the same way as the
compiler.

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

10 years agoReplace push_back()s by initializer list for shorter and cleaner code.
Eli Bendersky [Tue, 15 Apr 2014 17:19:26 +0000 (17:19 +0000)]
Replace push_back()s by initializer list for shorter and cleaner code.

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

10 years agoAdd test case for r206302
Eli Bendersky [Tue, 15 Apr 2014 16:57:53 +0000 (16:57 +0000)]
Add test case for r206302

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

10 years agoAdd support for CUDA __launch_bounds__ attribute to CodeGen.
Eli Bendersky [Tue, 15 Apr 2014 16:57:05 +0000 (16:57 +0000)]
Add support for CUDA __launch_bounds__ attribute to CodeGen.

Sema does have a CUDALaunchBoundsAttr, but CodeGen was doing nothing with it.
This change translates CUDALaunchBoundsAttr to maxntidx and minctasm
metadata, which NVPTX then translates to the correct PTX directives.

Patch by Manjunath Kudlur.

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

10 years agoverify-di: Call debug info verifier from clang
Duncan P. N. Exon Smith [Tue, 15 Apr 2014 16:27:43 +0000 (16:27 +0000)]
verify-di: Call debug info verifier from clang

This is paired with a patch to LLVM that creates a separate pass for
verifying debug info.

<rdar://problem/15500563>

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

10 years agoFix a comment to match the implementation
Alp Toker [Tue, 15 Apr 2014 16:24:50 +0000 (16:24 +0000)]
Fix a comment to match the implementation

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

10 years agoARM64: track alignment padding registers on AAPCS targets
Tim Northover [Tue, 15 Apr 2014 14:55:11 +0000 (14:55 +0000)]
ARM64: track alignment padding registers on AAPCS targets

This implements clause C.8 of the AAPCS in the front-end, so that Clang
accurately knows when the registers run out and it has to insert padding before
the stack objects begin.

PR19432.

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

10 years agoFix assertion when breaking string literals with tab characters.
Alexander Kornienko [Tue, 15 Apr 2014 14:52:43 +0000 (14:52 +0000)]
Fix assertion when breaking string literals with tab characters.

Summary: Fixes http://llvm.org/PR19368

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D3379

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

10 years agoMark clang/test/Index/pch-with-errors.c as XFAIL:mingw for now. Investigating.
NAKAMURA Takumi [Tue, 15 Apr 2014 14:44:55 +0000 (14:44 +0000)]
Mark clang/test/Index/pch-with-errors.c as XFAIL:mingw for now. Investigating.

This has been failing since r206202.

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

10 years agoAllow address space qualifiers on OpenCL array parameters
Fraser Cormack [Tue, 15 Apr 2014 11:38:29 +0000 (11:38 +0000)]
Allow address space qualifiers on OpenCL array parameters

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

10 years agoPR19178 __is_constructible returns true for abstract types.
Nikola Smiljanic [Tue, 15 Apr 2014 11:30:15 +0000 (11:30 +0000)]
PR19178 __is_constructible returns true for abstract types.

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

10 years agoclang-format: Understand proto text format without commas.
Daniel Jasper [Tue, 15 Apr 2014 09:54:30 +0000 (09:54 +0000)]
clang-format: Understand proto text format without commas.

Also removed spaces before colons as they don't seem to be used
frequently.

Before:
optional int32 b = 2
    [(foo_options) = {aaaaaaaaaaaaaaaaaaa : 123 bbbbbbbbbbbbbbbbbbbbbbbb :
                          "baz"}];

After:
optional int32 b = 2 [(foo_options) = {aaaaaaaaaaaaaaaaaaa: 123,
                                       bbbbbbbbbbbbbbbbbbbbbbbb:"baz"}];

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

10 years agox
Daniel Jasper [Tue, 15 Apr 2014 09:54:24 +0000 (09:54 +0000)]
x

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

10 years agoTest commit: minor formatting
Fraser Cormack [Tue, 15 Apr 2014 08:59:09 +0000 (08:59 +0000)]
Test commit: minor formatting

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

10 years agoclang-format: Basic support for C++1y.
Daniel Jasper [Tue, 15 Apr 2014 08:49:21 +0000 (08:49 +0000)]
clang-format: Basic support for C++1y.

Before:
  int bi{1 '000' 000};
After:
  int bi{1'000'000};

This fixes llvm.org/PR19342.

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

10 years agoclang-format: Early cut-off for inlining nested blocks.
Daniel Jasper [Tue, 15 Apr 2014 08:28:06 +0000 (08:28 +0000)]
clang-format: Early cut-off for inlining nested blocks.

Specifically, for a nested block or lambda, don't try to put the single
statement body inline, if it exceeds the column limit.

This should not change any observable behavior (as those would never
have led to the 'best' solution), but significantly speeds up formatting
time.

This fixes llvm.org/PR18761. Formatting time goes down from ~100s to a
few ms.

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

10 years agoclang-format: Cache results of formatting nested blocks.
Daniel Jasper [Tue, 15 Apr 2014 08:13:47 +0000 (08:13 +0000)]
clang-format: Cache results of formatting nested blocks.

This somewhat improves the performance problem reported in
llvm.org/PR18761. No other behavior changes intended.

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

10 years agoAST: Elaborated type specifier mangling occurs before nested-name
David Majnemer [Tue, 15 Apr 2014 05:51:25 +0000 (05:51 +0000)]
AST: Elaborated type specifier mangling occurs before nested-name

The Ts/Tu/Te manglings should occur before the nested-name's N.

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

10 years agoPartial revert of r206229, to get the build bots green again.
Aaron Ballman [Tue, 15 Apr 2014 01:19:35 +0000 (01:19 +0000)]
Partial revert of r206229, to get the build bots green again.

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

10 years agoFix typo from r206232
Richard Trieu [Tue, 15 Apr 2014 01:06:38 +0000 (01:06 +0000)]
Fix typo from r206232

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

10 years agoFix a bad interaction between -Wtautological-overlap-compare and delayed
Richard Trieu [Tue, 15 Apr 2014 00:57:50 +0000 (00:57 +0000)]
Fix a bad interaction between -Wtautological-overlap-compare and delayed
diagnostics which caused delayed diagnostics on dead paths to be emitted.

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

10 years agoCodeGen: Handle CapturedStmt in instrumentation based profiling
Justin Bogner [Tue, 15 Apr 2014 00:50:54 +0000 (00:50 +0000)]
CodeGen: Handle CapturedStmt in instrumentation based profiling

CapturedStmt was being ignored by instrumentation based profiling, and
its counters attributed to the containing function. Instead, we need
to treat this as a top level entity, like we do with blocks.

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

10 years agoFixing a typo, updating the diagnostic wording and logic based on post-commit review...
Aaron Ballman [Tue, 15 Apr 2014 00:36:39 +0000 (00:36 +0000)]
Fixing a typo, updating the diagnostic wording and logic based on post-commit review feedback. Amends r206186.

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

10 years ago[Driver][ARM64] Make sure the default CPU is passed to the assembler.
Quentin Colombet [Tue, 15 Apr 2014 00:27:35 +0000 (00:27 +0000)]
[Driver][ARM64] Make sure the default CPU is passed to the assembler.

<rdar://problem/16573920>

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

10 years agoFix warning in ms-x86-vtordisp test case
Reid Kleckner [Mon, 14 Apr 2014 23:49:17 +0000 (23:49 +0000)]
Fix warning in ms-x86-vtordisp test case

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

10 years agoEnsure we evaluate VLA bounds if a variably-modified type is used as the
Richard Smith [Mon, 14 Apr 2014 23:47:48 +0000 (23:47 +0000)]
Ensure we evaluate VLA bounds if a variably-modified type is used as the
argument to __builtin_va_arg. Patch by Rahul Jain, some test massaging and
IR emission order changes by me.

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

10 years agoMake sure these two files are distinct, or else the modules system may, on certain...
Nick Lewycky [Mon, 14 Apr 2014 22:30:21 +0000 (22:30 +0000)]
Make sure these two files are distinct, or else the modules system may, on certain file systems, treat them as if they were the same file.

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

10 years agoAdd module name and module map file to -module-file-info
Ben Langmuir [Mon, 14 Apr 2014 22:12:44 +0000 (22:12 +0000)]
Add module name and module map file to -module-file-info

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

10 years agoPR19415: Converting 'constexpr' to 'const' in a non-static data member can fail
Richard Smith [Mon, 14 Apr 2014 21:00:40 +0000 (21:00 +0000)]
PR19415: Converting 'constexpr' to 'const' in a non-static data member can fail
if the member is already 'const'. Don't assert in that case.

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

10 years agoPR19411: Walk lexical parents, not semantic parents, when determining whether a
Richard Smith [Mon, 14 Apr 2014 20:23:58 +0000 (20:23 +0000)]
PR19411: Walk lexical parents, not semantic parents, when determining whether a
DeclContext is (lexically) within a C language linkage specification.

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

10 years agoFix find command in test/Modules/prune.m broken by r206201
Ben Langmuir [Mon, 14 Apr 2014 18:50:28 +0000 (18:50 +0000)]
Fix find command in test/Modules/prune.m broken by r206201

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

10 years agoAdd clang:: qualifier back to Module
Ben Langmuir [Mon, 14 Apr 2014 18:21:04 +0000 (18:21 +0000)]
Add clang:: qualifier back to Module

Apparently this was required by some compilers.

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

10 years agoAllow multiple modules with the same name to coexist in the module cache
Ben Langmuir [Mon, 14 Apr 2014 18:00:01 +0000 (18:00 +0000)]
Allow multiple modules with the same name to coexist in the module cache

To differentiate between two modules with the same name, we will
consider the path the module map file that they are defined by* part of
the â€˜key’ for looking up the precompiled module (pcm file).
Specifically, this patch renames the precompiled module (pcm) files from
  cache-path/<module hash>/Foo.pcm
to
  cache-path/<module hash>/Foo-<hash of module map path>.pcm

In addition, I’ve taught the ASTReader to re-resolve the names of
imported modules during module loading so that if the header search
context changes between when a module was originally built and when it
is loaded we can rebuild it if necessary.  For example, if module A
imports module B

first time:
clang -I /path/to/A -I /path/to/B ...

second time:
clang -I /path/to/A -I /different/path/to/B ...

will now rebuild A as expected.

* in the case of inferred modules, we use the module map file that
allowed the inference, not the __inferred_module.map file, since the
inferred file path is the same for every inferred module.

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

10 years agoProperly diagnose Microsoft __declspec attributes which have optional argument lists...
Aaron Ballman [Mon, 14 Apr 2014 16:44:26 +0000 (16:44 +0000)]
Properly diagnose Microsoft __declspec attributes which have optional argument lists when the arguments are elided. eg)

__declspec(deprecated()) // error
__declspec(deprecated) // OK
__declspec(deprecated("")) // OK

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

10 years agoOnDiskHashTable: Make the iterable version separate.
Justin Bogner [Mon, 14 Apr 2014 16:34:29 +0000 (16:34 +0000)]
OnDiskHashTable: Make the iterable version separate.

Currently the on disk hash table's key_iterator and data_iterator make
the assumption that the table data starts exactly four bytes after the
base of the table. This happens to be true for all of the tables we
currently iterate over, but not for all of the OnDiskHashTables we
currently use. For example, key_ and data_iterator would iterate over
meaningless data if they were used on the hash tables in PTHLexer.

We make the API safer by breaking this into two types. One doesn't
have the iterators, and the other must be told where the payload
starts.

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

10 years agoOnDiskHashTable: clang-format and consistent naming
Justin Bogner [Mon, 14 Apr 2014 16:34:19 +0000 (16:34 +0000)]
OnDiskHashTable: clang-format and consistent naming

No functional change. Style cleanups in OnDiskChainedHashTable in
preparation for some other changes here.

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

10 years agoProperly diagnose standard C++ attributes which have optional argument lists when...
Aaron Ballman [Mon, 14 Apr 2014 16:03:22 +0000 (16:03 +0000)]
Properly diagnose standard C++ attributes which have optional argument lists when the arguments are elided. eg)

[[deprecated()]] // error
[[deprecated]] // OK
[[deprecated("")]] // OK
[[gnu::deprecated()]] // OK

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

10 years agoAdd support for named values in the parser.
Samuel Benzaquen [Mon, 14 Apr 2014 13:51:21 +0000 (13:51 +0000)]
Add support for named values in the parser.

Summary: Add support for named values in the parser.

Reviewers: pcc

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D3276

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

10 years agoclang-format: Fix regression caused by r206165.
Daniel Jasper [Mon, 14 Apr 2014 13:15:29 +0000 (13:15 +0000)]
clang-format: Fix regression caused by r206165.

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

10 years agoclang-format: Fix incorrect &&-detection in macros.
Daniel Jasper [Mon, 14 Apr 2014 12:50:02 +0000 (12:50 +0000)]
clang-format: Fix incorrect &&-detection in macros.

Before:
  #define A(a, b) (a &&b)

After:
  #define A(a, b) (a && b)

This fixes llvm.org/PR19343.

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

10 years agoclang-format: Improve array literal formatting fix in r206161.
Daniel Jasper [Mon, 14 Apr 2014 12:11:07 +0000 (12:11 +0000)]
clang-format: Improve array literal formatting fix in r206161.

Instead of choosing based on the number of elements, simply respect the
user's choice of where to wrap array literals.

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

10 years agoclang-format: With ColumnLimit=0, keep short array literals on a line.
Daniel Jasper [Mon, 14 Apr 2014 12:05:05 +0000 (12:05 +0000)]
clang-format: With ColumnLimit=0, keep short array literals on a line.

Before:
    NSArray* a = [[NSArray alloc] initWithArray:@[
                                                   @"a"
                                                ]
                                      copyItems:YES];

After:
    NSArray* a = [[NSArray alloc] initWithArray:@[ @"a" ]
                                      copyItems:YES];

This fixed llvm.org/PR19080.

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

10 years agoclang-format: Don't allow hanging indentation for operators on new lines
Daniel Jasper [Mon, 14 Apr 2014 11:08:45 +0000 (11:08 +0000)]
clang-format: Don't allow hanging indentation for operators on new lines

Before:
  if (aaaaaaaa && bbbbbbbbbbbbbbb // need to wrap
                  == cccccccccccccc) ...

After:
  if (aaaaaaaa
      && bbbbbbbbbbbbbbb // need to wrap
         == cccccccccccccc) ...

The same rule has already be implemented for BreakBeforeBinaryOperators
set to false in r205527.

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

10 years agoFormat code around VCS conflict markers.
Manuel Klimek [Mon, 14 Apr 2014 09:14:11 +0000 (09:14 +0000)]
Format code around VCS conflict markers.

Now correctly formats:
  {
    int a;
    void f() {
      callme(some(parameter1,
  <<<<<<< text by the vcs
                  parameter2),
  ||||||| text by the vcs
                  parameter2),
             parameter3,
  ======= text by the vcs
                  parameter2, parameter3),
  >>>>>>> text by the vcs
             otherparameter);
    }
  }

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

10 years agoclang-format: Improve formatting of annotated variables.
Daniel Jasper [Mon, 14 Apr 2014 08:15:20 +0000 (08:15 +0000)]
clang-format: Improve formatting of annotated variables.

Before:
  bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(
      aaaaaaaaaaaa) = aaaaaaaa::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
  bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(aaaaaaaaaaaa) =
      aaaaaaaa::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

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

10 years agoImprove error recovery around colon.
Serge Pavlov [Sun, 13 Apr 2014 16:52:03 +0000 (16:52 +0000)]
Improve error recovery around colon.

Parse of nested name spacifier is modified so that it properly recovers
if colon is mistyped as double colon in case statement.
This patch fixes PR15133.

Differential Revision: http://llvm-reviews.chandlerc.com/D2870

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

10 years agoFix diagnostics for C-style cast to function type.
Logan Chien [Sun, 13 Apr 2014 16:08:24 +0000 (16:08 +0000)]
Fix diagnostics for C-style cast to function type.

If the C-style type cast is applied to the overloaded
function and the destination type is function type,
then Clang will crash with assertion failure.  For example,

    void foo(int);
    void foo(int, int);
    void bar() {
        typedef void (ft)(int);
        ft p = (ft)foo;
    }

In this case, the overloaded function foo will be cast to
a function type, which should be considered as an error.
But, unfortunately, since the function resolution is using
canonical type, the matched function will be returned, and
result in SEGV.

This patch fixes this issue by removing the assertion and
add some error diagnostics as the one in static_cast.

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

10 years agoMS ABI: Bitfields FielDecls only align if they allocate
David Majnemer [Sun, 13 Apr 2014 08:15:50 +0000 (08:15 +0000)]
MS ABI: Bitfields FielDecls only align if they allocate

Don't consider a __declspec(align) on a bitfield's declaration if it didn't
allocate any underlying storage.

This fixes PR19414.

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

10 years agoPR19339: Disambiguate lambdas with init-captures from designated initializers
Richard Smith [Sun, 13 Apr 2014 04:31:48 +0000 (04:31 +0000)]
PR19339: Disambiguate lambdas with init-captures from designated initializers
properly.

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

10 years ago[-fms-extensions] Add tests for __FUNCDNAME__
David Majnemer [Sun, 13 Apr 2014 02:29:55 +0000 (02:29 +0000)]
[-fms-extensions] Add tests for __FUNCDNAME__

__FUNCDNAME__ was introduced way back in r194181 but I forgot to add
these tests.

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

10 years agoMS ABI: #pragma vtordisp(0) only disables new vtordisps
David Majnemer [Sun, 13 Apr 2014 02:27:32 +0000 (02:27 +0000)]
MS ABI: #pragma vtordisp(0) only disables new vtordisps

Previously, it was believed that #pragma vtordisp(0) would prohibit the
generation of any and all vtordisps.

In actuality, it only disables the generation of additional vtordisps.

This fixes PR19413.

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

10 years agoTests for DR501-525.
Richard Smith [Sun, 13 Apr 2014 00:40:32 +0000 (00:40 +0000)]
Tests for DR501-525.

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

10 years agoReplace llvm::array_endof with C++11's std::end.
Benjamin Kramer [Sat, 12 Apr 2014 15:42:48 +0000 (15:42 +0000)]
Replace llvm::array_endof with C++11's std::end.

No functionality change.

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

10 years agoFix test/Modules/cxx-irgen.cpp for PPC64
Hal Finkel [Sat, 12 Apr 2014 11:50:34 +0000 (11:50 +0000)]
Fix test/Modules/cxx-irgen.cpp for PPC64

Target ABI code might add signext to the return types.

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

10 years agoAdd description about the __is_identifier() macro
Yunzhong Gao [Sat, 12 Apr 2014 02:25:32 +0000 (02:25 +0000)]
Add description about the __is_identifier() macro

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

10 years agoCodeGen: Test instrumentation based profiling of templates
Justin Bogner [Sat, 12 Apr 2014 00:54:06 +0000 (00:54 +0000)]
CodeGen: Test instrumentation based profiling of templates

Make sure that templates are handled correctly by profile
instrumentation.

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

10 years ago[MS-ABI] Fix warning introduced in r206087
Warren Hunt [Sat, 12 Apr 2014 00:20:50 +0000 (00:20 +0000)]
[MS-ABI] Fix warning introduced in r206087
No functional change.

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

10 years agoFollow-up to r205999: Emit an artificial location (valid scope, line 0)
Adrian Prantl [Fri, 11 Apr 2014 23:45:01 +0000 (23:45 +0000)]
Follow-up to r205999: Emit an artificial location (valid scope, line 0)
for CXXGlobalInit/Dtor helper functions.
This makes _GLOBAL__I_a regain its DW_AT_high/low_pc in the debug info.

Thanks to echristo for catching this!

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

10 years ago[MS-ABI] Fixed alias-avoidance padding in the presence of vtordisps
Warren Hunt [Fri, 11 Apr 2014 23:33:35 +0000 (23:33 +0000)]
[MS-ABI] Fixed alias-avoidance padding in the presence of vtordisps
If a vtordisp exists between two bases, then there is no need for
additional alias avoidance padding.  Test case included.

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

10 years agoCodeGen: Fix handling of C++11 lambdas in profiling
Justin Bogner [Fri, 11 Apr 2014 23:06:35 +0000 (23:06 +0000)]
CodeGen: Fix handling of C++11 lambdas in profiling

Until now we were generating duplicate counters for lambdas: one set
in the function where the lambda was declared and another for the
lambda itself. Instead, we should skip over the bodies of lambdas in
their containing contexts.

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

10 years ago[MS-ABI] Update to vtordisp computation
Warren Hunt [Fri, 11 Apr 2014 22:05:28 +0000 (22:05 +0000)]
[MS-ABI] Update to vtordisp computation
A portion of the vtordisp computation that was previously unguarded by a
test for the declaration of user defined constructors/destructors was
erroniously adding vtordisps to things that shouldn't have them.  This
patch correctly guards that codepath.  In addition, it updates the
comments to make them more clear.  Test case is included.

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

10 years agoAdd a test to distinguish between reserved tokens and normal identifiers.
Yunzhong Gao [Fri, 11 Apr 2014 20:55:19 +0000 (20:55 +0000)]
Add a test to distinguish between reserved tokens and normal identifiers.

The -fms-extensions option affects a number of subtle front-end C/C++
behaviors, and it would be useful to be able to distinguish MS keywords
from regular identifiers in the ms-extensions mode even if the triple
does not define a Windows target. It should make life easier if anyone
needs to port their Windows codes to elsewhere.

Differential Revision: http://reviews.llvm.org/D3034

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

10 years ago[PGO] Change MapRegionCounters to be a RecursiveASTVisitor.
Bob Wilson [Fri, 11 Apr 2014 17:16:13 +0000 (17:16 +0000)]
[PGO] Change MapRegionCounters to be a RecursiveASTVisitor.

This avoids the overhead of specifying all the traversal code when using
ConstStmtVisitor and makes it a lot easier to maintain this.

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

10 years agoSimplify RecordLayoutBuilder with getAsCXXRecordDecl()
Reid Kleckner [Fri, 11 Apr 2014 16:57:42 +0000 (16:57 +0000)]
Simplify RecordLayoutBuilder with getAsCXXRecordDecl()

No functionality change.

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

10 years agoCorrectly handle escaped newlines when the next token starts without a space.
Manuel Klimek [Fri, 11 Apr 2014 12:27:47 +0000 (12:27 +0000)]
Correctly handle escaped newlines when the next token starts without a space.

We will need this to correctly handle conflict markers inside macro
definitions.

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

10 years agoAdd -fmodules-strict-decluse to check that all headers are in modules
Daniel Jasper [Fri, 11 Apr 2014 11:47:45 +0000 (11:47 +0000)]
Add -fmodules-strict-decluse to check that all headers are in modules

Review: http://reviews.llvm.org/D3335

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

10 years agoCodeGen: Handle binary conditional operators in PGO instrumentation
Justin Bogner [Fri, 11 Apr 2014 06:10:10 +0000 (06:10 +0000)]
CodeGen: Handle binary conditional operators in PGO instrumentation

This treats binary conditional operators in the same way as ternary
conditional operators for instrumentation based profiling.

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

10 years agoCleanup: Add default arguments to CodeGenFunction::StartFunction.
Adrian Prantl [Fri, 11 Apr 2014 01:13:04 +0000 (01:13 +0000)]
Cleanup: Add default arguments to CodeGenFunction::StartFunction.
Thanks dblaikie for the suggestion!

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

10 years agoFix handling of redeclaration lookup for using declarations, where the prior
Richard Smith [Fri, 11 Apr 2014 01:03:38 +0000 (01:03 +0000)]
Fix handling of redeclaration lookup for using declarations, where the prior
declaration is not visible. Previously we didn't find hidden friend names in
this redeclaration lookup, because we forgot to treat it as a redeclaration
lookup. Conversely, we did find some local extern names, but those don't
actually conflict with a namespace-scope using declaration, because the only
conflicts we can get are scope conflicts, not conflicts due to the entities
being members of the same namespace.

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

10 years ago[MS-ABI] Update Comments in RecordLayoutBuilder - no functional change
Warren Hunt [Fri, 11 Apr 2014 00:54:15 +0000 (00:54 +0000)]
[MS-ABI] Update Comments in RecordLayoutBuilder - no functional change
This patch updates the comments in RecordLayoutBuilder about record
layout in the MS-ABI.  Also, I added a section about known
incompatibilities.

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

10 years agoSwitch from constexpr to const char *const
Duncan P. N. Exon Smith [Fri, 11 Apr 2014 00:43:16 +0000 (00:43 +0000)]
Switch from constexpr to const char *const

Responding to Richard Smith's review of r205037.

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

10 years ago[MS-ABI] Update virtual base padding rules to match MSVC 10+
Warren Hunt [Fri, 11 Apr 2014 00:14:09 +0000 (00:14 +0000)]
[MS-ABI] Update virtual base padding rules to match MSVC 10+
In version 9 (VS2010) (and prior)? versions of msvc, if the last field
in a record was a bitfield padding equal to the size of the storage
class of that bitfield was added before each vbase and vtordisp.  This
patch removes that feature from clang and updates the lit tests to
reflect it.

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

10 years agoInstrProf: Rename Decl parameters from S to D
Duncan P. N. Exon Smith [Thu, 10 Apr 2014 23:37:36 +0000 (23:37 +0000)]
InstrProf: Rename Decl parameters from S to D

No functionality change.

<rdar://problem/16435801>

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

10 years agoInstrProf: Read unsigned numbers with strtoul and strtoull
Duncan P. N. Exon Smith [Thu, 10 Apr 2014 23:37:34 +0000 (23:37 +0000)]
InstrProf: Read unsigned numbers with strtoul and strtoull

Fixes a bug where unsigned numbers are read using strtol and strtoll.

I don't have a testcase because this bug is effectively unobservable
right now.  To expose the problem in the hash, we would need a function
with greater than INT64_MAX counters, which we don't handle anyway.  To
expose the problem in the function count, we'd need a function with
greater than INT32_MAX counters; this is theoretically observable, but
it isn't a practical testcase to check in.

An upcoming commit changes the hash to be non-trivial, so we'll get some
coverage eventually.

<rdar://problem/16435801>

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

10 years ago[MS-ABI] Fix to vbptr injection site calculation.
Warren Hunt [Thu, 10 Apr 2014 23:23:34 +0000 (23:23 +0000)]
[MS-ABI] Fix to vbptr injection site calculation.
The vbptr is injected after the last non-virtual base lexographically
rather than the last non-virtual base in layout order.  Test case
included.  Also, some line ending fixes.

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

10 years agoDebug info: (Bugfix) Make sure artificial functions like _GLOBAL__I_a
Adrian Prantl [Thu, 10 Apr 2014 23:21:53 +0000 (23:21 +0000)]
Debug info: (Bugfix) Make sure artificial functions like _GLOBAL__I_a
are not associated with any source lines.

Previously, if the Location of a Decl was empty, EmitFunctionStart would
just keep using CurLoc, which would sometimes be correct (e.g., thunks)
but in other cases would just point to a hilariously random location.

This patch fixes this by completely eliminating all uses of CurLoc from
EmitFunctionStart and rather have clients explicitly pass in a
SourceLocation for the function header and the function body.

rdar://problem/14985269

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

10 years agoUpdate Clang for LLVM split stack API changes in r205997
Reid Kleckner [Thu, 10 Apr 2014 22:59:13 +0000 (22:59 +0000)]
Update Clang for LLVM split stack API changes in r205997

Patch by Alex Crichton!

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

10 years ago[MS-ABI] Fixed __declspec(align()) on bitfields under #pragma pack.
Warren Hunt [Thu, 10 Apr 2014 22:15:18 +0000 (22:15 +0000)]
[MS-ABI] Fixed __declspec(align()) on bitfields under #pragma pack.
When __declspec(align()) is applied to a bitfield it affects the
alignment rather than the required alignment of the struct.  The major
feature that this patch adds is that the alignment of the structure
obeys the alignment of __declspec(align()) from the bitfield over the
value specified in pragma pack.

Test cases are included.
The patch also includes some small cleanups in recordlayoutbuilder and
some cleanups to some lit tests, including line endings (but no
functionality change to lit tests)

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