]> granicus.if.org Git - clang/log
clang
10 years agoUse simpler version of fs::create_directory.
Rafael Espindola [Thu, 13 Feb 2014 04:22:54 +0000 (04:22 +0000)]
Use simpler version of fs::create_directory.

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

10 years agoUse simpler version of llvm::sys::fs::create_directories.
Rafael Espindola [Thu, 13 Feb 2014 04:08:44 +0000 (04:08 +0000)]
Use simpler version of llvm::sys::fs::create_directories.

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

10 years agoFixing a compiler assertion with zero-width bit-fields in packed structs.
Yunzhong Gao [Thu, 13 Feb 2014 02:45:10 +0000 (02:45 +0000)]
Fixing a compiler assertion with zero-width bit-fields in packed structs.
According to the GNU docs, zero-sized bitfields should not be affected by the
packed attribute.

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

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

10 years agoReally fix unused variable warnings in CIndex.
Reid Kleckner [Thu, 13 Feb 2014 01:19:59 +0000 (01:19 +0000)]
Really fix unused variable warnings in CIndex.

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

10 years agoms_struct layout replaces platform-specific behavior like
John McCall [Thu, 13 Feb 2014 00:50:08 +0000 (00:50 +0000)]
ms_struct layout replaces platform-specific behavior like
useBitFieldTypeAlignment() and appears to ignore the special
bit-packing semantics of __attribute__((packed)).

Further flesh out an already-extensive comment.

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

10 years agoChange testcase to use FileCheck.
John McCall [Thu, 13 Feb 2014 00:50:02 +0000 (00:50 +0000)]
Change testcase to use FileCheck.

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

10 years agoFix uninitialized read in vtordisp pragma code.
Reid Kleckner [Thu, 13 Feb 2014 00:44:34 +0000 (00:44 +0000)]
Fix uninitialized read in vtordisp pragma code.

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

10 years agoFix some -Wdocumentation warnings in Sema.h and try to fix test for win64
Reid Kleckner [Thu, 13 Feb 2014 00:22:04 +0000 (00:22 +0000)]
Fix some -Wdocumentation warnings in Sema.h and try to fix test for win64

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

10 years agoSilence unused variable warning in CIndex.cpp with NDEBUG
Reid Kleckner [Wed, 12 Feb 2014 23:56:20 +0000 (23:56 +0000)]
Silence unused variable warning in CIndex.cpp with NDEBUG

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

10 years agoMS ABI: Implement #pragma vtordisp() and clang-cl /vdN
Reid Kleckner [Wed, 12 Feb 2014 23:50:26 +0000 (23:50 +0000)]
MS ABI: Implement #pragma vtordisp() and clang-cl /vdN

These features are new in VS 2013 and are necessary in order to layout
std::ostream correctly.  Currently we have an ABI incompatibility when
self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper
in gtest.

This change adds another implicit attribute, MSVtorDispAttr, because
implicit attributes are currently the best way to make sure the
information stays on class templates through instantiation.

Reviewers: majnemer

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

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

10 years agoRemove FIXME and hardcoded triple from this test (PR18251)
Hans Wennborg [Wed, 12 Feb 2014 21:40:46 +0000 (21:40 +0000)]
Remove FIXME and hardcoded triple from this test (PR18251)

We don't support using the MS ABI with non-x86/x86_64 targets anyway.

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

10 years agoRemove unused diagnostic.
Benjamin Kramer [Wed, 12 Feb 2014 21:25:40 +0000 (21:25 +0000)]
Remove unused diagnostic.

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

10 years ago[examples] Use loadable modules instead of shared libraries for Clang plugins.
Jordan Rose [Wed, 12 Feb 2014 21:04:23 +0000 (21:04 +0000)]
[examples] Use loadable modules instead of shared libraries for Clang plugins.

This avoids linking in extra copies of, say, LLVMSupport.

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

10 years agoSema: Restrict alignment to 2**28.
David Majnemer [Wed, 12 Feb 2014 20:36:10 +0000 (20:36 +0000)]
Sema: Restrict alignment to 2**28.

Allowing alignment past this point causes wrap around within clang.

N.B.  GCC has the same restriction.

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

10 years agoAttributes: Avoid a big useless copy in the emitter
Reid Kleckner [Wed, 12 Feb 2014 19:26:24 +0000 (19:26 +0000)]
Attributes: Avoid a big useless copy in the emitter

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

10 years agorelax testcase and make ppc64 buildbots happy.
Adrian Prantl [Wed, 12 Feb 2014 19:26:19 +0000 (19:26 +0000)]
relax testcase and make ppc64 buildbots happy.

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

10 years agolibclang: report error code for bad PCH files
Dmitri Gribenko [Wed, 12 Feb 2014 19:12:37 +0000 (19:12 +0000)]
libclang: report error code for bad PCH files

This commit improves libclang to report the error condition when
CXTranslationUnit can not be created because of a stale PCH file.  This allows
the caller, for example, to rebuild the PCH file and retry the request.

There two are APIs in libclang that return a CXTranslationUnit and don't
support reporting detailed errors (the only error condition is a NULL result).
For these APIs, a second, superior, version is introduced --
clang_createTranslationUnit2 and clang_parseTranslationUnit2.  These functions
return a CXTranslationUnit indirectly and also return an error code.  Old
functions are still supported and are nothing more than convenience wrappers
that ignore extended error codes.

As a cleanup, this commit also categorizes some libclang errors in the
functions I had to modify anyway.

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

10 years agoDocument and improve the debug-property-synth.m test based on the
Adrian Prantl [Wed, 12 Feb 2014 18:24:07 +0000 (18:24 +0000)]
Document and improve the debug-property-synth.m test based on the
information provided in the referenced radar.

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

10 years agoRevert "Remove bad debug info test."
Adrian Prantl [Wed, 12 Feb 2014 18:24:04 +0000 (18:24 +0000)]
Revert "Remove bad debug info test."

This reverts commit r201183.
The test, albeit undocumented and badly written is still testing something
useful. It will be updated in a subsequent commit.

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

10 years agoAttributes: Emit enumerators in td file declaration order
Reid Kleckner [Wed, 12 Feb 2014 18:22:18 +0000 (18:22 +0000)]
Attributes: Emit enumerators in td file declaration order

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

10 years agoRevert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and...
Daniel Sanders [Wed, 12 Feb 2014 15:39:20 +0000 (15:39 +0000)]
Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call

It introduced multiple test failures in the buildbots.

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

10 years agoArcanist failed to commit the two clang test corrections that should have been in...
Daniel Sanders [Wed, 12 Feb 2014 14:46:15 +0000 (14:46 +0000)]
Arcanist failed to commit the two clang test corrections that should have been in r201237.

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

10 years agolibclang: fix a crash in clang_disposeDiagnosticSet when it is passed a NULL argument
Dmitri Gribenko [Wed, 12 Feb 2014 14:17:58 +0000 (14:17 +0000)]
libclang: fix a crash in clang_disposeDiagnosticSet when it is passed a NULL argument

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

10 years agoWhitespace cleanup (mostly stray tabs, a few not-quite-empty lines).
Tim Northover [Wed, 12 Feb 2014 12:56:48 +0000 (12:56 +0000)]
Whitespace cleanup (mostly stray tabs, a few not-quite-empty lines).

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

10 years agoARM & NEON: add test for r101232
Tim Northover [Wed, 12 Feb 2014 12:08:06 +0000 (12:08 +0000)]
ARM & NEON: add test for r101232

rdar://problem/16035743

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

10 years agoARM NEON: fix range checking on immediates.
Tim Northover [Wed, 12 Feb 2014 12:04:59 +0000 (12:04 +0000)]
ARM NEON: fix range checking on immediates.

Previously, range checking on the __builtin_neon_XYZ_v Clang intrinsics didn't
take account of the type actually passed to the call, which meant a request
like "vext_s16(a, b, 7)" was allowed through (TableGen was conservative and
allowed 0-7 for all types). This caused an assert in the backend because the
lane doesn't make sense.

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

10 years agoDon't use find | xargs in test/Modules/fmodules-validate-once-per-build-session.c
Dmitri Gribenko [Wed, 12 Feb 2014 11:50:37 +0000 (11:50 +0000)]
Don't use find | xargs in test/Modules/fmodules-validate-once-per-build-session.c

With -fdisable-module-hash, we can implement this with a simple 'cp'.

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

10 years agoclang/test/Modules/fmodules-validate-once-per-build-session.c: Tweak for gnuwin32...
NAKAMURA Takumi [Wed, 12 Feb 2014 11:42:12 +0000 (11:42 +0000)]
clang/test/Modules/fmodules-validate-once-per-build-session.c: Tweak for gnuwin32 with %/t (instead of %t).

xargs didn't handle dosish paths, while find foo\bar\ emits dosish paths.

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

10 years agoclang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant dosish...
NAKAMURA Takumi [Wed, 12 Feb 2014 11:42:02 +0000 (11:42 +0000)]
clang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant dosish pathsep.

FIXME: It could be more simple...

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

10 years ago'svn add' files I forgot for r201224 (Add an option to allow Clang verify
Dmitri Gribenko [Wed, 12 Feb 2014 10:40:07 +0000 (10:40 +0000)]
'svn add' files I forgot for r201224 (Add an option to allow Clang verify
source files for a module only once during)

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

10 years agoAdd an option to allow Clang verify source files for a module only once during
Dmitri Gribenko [Wed, 12 Feb 2014 10:33:14 +0000 (10:33 +0000)]
Add an option to allow Clang verify source files for a module only once during
the build

When Clang loads the module, it verifies the user source files that the module
was built from.  If any file was changed, the module is rebuilt.  There are two
problems with this:
1. correctness: we don't verify system files (there are too many of them, and
   stat'ing all of them would take a lot of time);
2. performance: the same module file is verified again and again during a
   single build.

This change allows the build system to optimize source file verification.  The
idea is based on the fact that while the project is being built, the source
files don't change.  This allows us to verify the module only once during a
single build session.  The build system passes a flag,
-fbuild-session-timestamp=, to inform Clang of the time when the build started.
The build system also requests to enable this feature by passing
-fmodules-validate-once-per-build-session.  If these flags are not passed, the
behavior is not changed.  When Clang verifies the module the first time, it
writes out a timestamp file.  Then, when Clang loads the module the second
time, it finds a timestamp file, so it can compare the verification timestamp
of the module with the time when the build started.  If the verification
timestamp is too old, the module is verified again, and the timestamp file is
updated.

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

10 years ago[ARM] Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex...
Amara Emerson [Wed, 12 Feb 2014 10:22:35 +0000 (10:22 +0000)]
[ARM] Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex-A53/A57.

This was caused by r200708 which enabled the crypto feature for these cores.

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

10 years agoFix memory leak introduced by r201010.
Daniel Jasper [Wed, 12 Feb 2014 08:45:05 +0000 (08:45 +0000)]
Fix memory leak introduced by r201010.

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

10 years agoFix r201205's use-after-free bug caught by sanitizer bot
Jonathan Roelofs [Wed, 12 Feb 2014 06:37:27 +0000 (06:37 +0000)]
Fix r201205's use-after-free bug caught by sanitizer bot

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

10 years agoAdd Multilib selection machinery
Jonathan Roelofs [Wed, 12 Feb 2014 03:21:20 +0000 (03:21 +0000)]
Add Multilib selection machinery

This patch improves the support for picking Multilibs from gcc installations.
It also provides a better approximation for the flags '-print-multi-directory'
and '-print-multi-lib'.

This reverts r201203 (i.e. re-applying r201202 with small fixes in
unittests/CMakeLists.txtto make the build bots happy).

review: http://llvm-reviews.chandlerc.com/D2538

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

10 years agoRevert 201202
Jonathan Roelofs [Wed, 12 Feb 2014 01:36:51 +0000 (01:36 +0000)]
Revert 201202

Breaks cmake configure of new unit tests directory

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

10 years agoAdd Multilib selection machinery
Jonathan Roelofs [Wed, 12 Feb 2014 01:29:25 +0000 (01:29 +0000)]
Add Multilib selection machinery

This patch improves the support for picking Multilibs from gcc installations.
It also provides a better approximation for the flags '-print-multi-directory'
and '-print-multi-lib'.

review: http://llvm-reviews.chandlerc.com/D2538

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

10 years agoMS ABI: vptr injection should obey alignment requirements
David Majnemer [Wed, 12 Feb 2014 00:43:02 +0000 (00:43 +0000)]
MS ABI: vptr injection should obey alignment requirements

vptr injection must inject padding equivalent to the alignment of the
most aligned non-virtual subobject, not the alignment of the enclosing
record.

To fascilitate this change, don't let record layout observe the
alignment of the record until we've injected our vptrs. Also, do not
allow the alignment of vbases to affect required alignment until just
before we insert the vtordisp field.

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

10 years agoFix build error caused by r201186 (GCC's "declaration of X changes meaning of Y").
Alexander Kornienko [Tue, 11 Feb 2014 22:14:03 +0000 (22:14 +0000)]
Fix build error caused by r201186 (GCC's "declaration of X changes meaning of Y").

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

10 years agoExpose the name of the checker producing each diagnostic message.
Alexander Kornienko [Tue, 11 Feb 2014 21:49:21 +0000 (21:49 +0000)]
Expose the name of the checker producing each diagnostic message.

Summary:
In clang-tidy we'd like to know the name of the checker producing each
diagnostic message. PathDiagnostic has BugType and Category fields, which are
both arbitrary human-readable strings, but we need to know the exact name of the
checker in the form that can be used in the CheckersControlList option to
enable/disable the specific checker.

This patch adds the CheckName field to the CheckerBase class, and sets it in
the CheckerManager::registerChecker() method, which gets them from the
CheckerRegistry.

Checkers that implement multiple checks have to store the names of each check
in the respective registerXXXChecker method.

Reviewers: jordan_rose, krememek

Reviewed By: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2557

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

10 years agoRemove bad debug info test.
David Blaikie [Tue, 11 Feb 2014 21:37:47 +0000 (21:37 +0000)]
Remove bad debug info test.

Another test that's testing through assembly from Clang which is
problematic. An attempt to upgrade this to just be an IR-generation test
was unsuccessful (I was unable to get this test to fail) but it looks
like there's other, better, test coverage in this area
(test/CodeGenObjC/debuginfo-properties.m) anyway.

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

10 years agoupdate of the clang version (should probably managed in the configure)
Sylvestre Ledru [Tue, 11 Feb 2014 21:37:27 +0000 (21:37 +0000)]
update of the clang version (should probably managed in the configure)

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

10 years agoRemove bad debug info test.
David Blaikie [Tue, 11 Feb 2014 21:16:44 +0000 (21:16 +0000)]
Remove bad debug info test.

This test case doesn't belong in Clang (it's testing IndVarSimplify) but
in an effort to reproduce the test case this was intended to cover (by
essentially reverting r134441) I wasn't able to reproduce the failure
this test case should've produced. So I haven't ported this down to
LLVM, instead I'm just deleting it.

I suspect the test is just underconstrained, but I've no great interest
in trying hard to fix it right now - if anyone else wants to, I'd be
more than welcome to that.

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

10 years agoMS ABI: Add support for the -vm{b,g,s,m,v} flags
David Majnemer [Tue, 11 Feb 2014 21:05:00 +0000 (21:05 +0000)]
MS ABI: Add support for the -vm{b,g,s,m,v} flags

These flags control the inheritance model initially used by the
translation unit.

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

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

10 years agoTest commit -- Remove an extra newline from Toolchains.cpp
Jonathan Roelofs [Tue, 11 Feb 2014 20:02:34 +0000 (20:02 +0000)]
Test commit -- Remove an extra newline from Toolchains.cpp

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

10 years ago[Sema] Revert the change in r200622 that allowed integer casts to silence -Wnon-liter...
Argyrios Kyrtzidis [Tue, 11 Feb 2014 17:53:22 +0000 (17:53 +0000)]
[Sema] Revert the change in r200622 that allowed integer casts to silence -Wnon-literal-null-conversion in C code.

It is actually useful to warn in such cases, thanks to Dmitri for pushing on this and making us see the light!

Related to rdar://15925483 and rdar://15922612. The latter radar is where the usefulness of the warning is most clear.

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

10 years ago'nonnull(1)' on a block parameter should apply to the block's argument.
Jordan Rose [Tue, 11 Feb 2014 17:27:59 +0000 (17:27 +0000)]
'nonnull(1)' on a block parameter should apply to the block's argument.

Thanks to r199467, __attribute__((nonnull)) (without arguments) can apply
directly to parameters, instead of being applied to the whole function.
However, the old form of nonnull (with an argument index) could also apply
to the arguments of function and block pointers, and both of these can be
passed as parameters.

Now, if 'nonnull' with an argument is found on a parameter, /and/ the
parameter is a function or block pointer, it is handled the old way.

PR18795

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

10 years agoRename some PCH-related errors to have 'err_' as their prefix
Dmitri Gribenko [Tue, 11 Feb 2014 15:40:09 +0000 (15:40 +0000)]
Rename some PCH-related errors to have 'err_' as their prefix

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

10 years agoFix a typo in the function name that I just introduced (r201155)
Dmitri Gribenko [Tue, 11 Feb 2014 15:02:48 +0000 (15:02 +0000)]
Fix a typo in the function name that I just introduced (r201155)

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

10 years agolibclang: audit all APIs that accept a CXTranslationUnit to make sure that
Dmitri Gribenko [Tue, 11 Feb 2014 14:34:14 +0000 (14:34 +0000)]
libclang: audit all APIs that accept a CXTranslationUnit to make sure that
checks for invalid translation unit are in place.  Also, while there, add log
output for this case.

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

10 years agolibclang: use namespace qualifiers in the macro, so that it does not require
Dmitri Gribenko [Tue, 11 Feb 2014 12:25:31 +0000 (12:25 +0000)]
libclang: use namespace qualifiers in the macro, so that it does not require
'using namespace clang::cxindex'.

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

10 years agoAArch64: share slgihtly more NEON implementation with ARM.
Tim Northover [Tue, 11 Feb 2014 11:27:44 +0000 (11:27 +0000)]
AArch64: share slgihtly more NEON implementation with ARM.

The s64/u64 vcvt conversion operations are actually pretty much identical to
the s32/u32 ones in implementation, and can be shared with just one extra
variable.

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

10 years agoXCore target: add section information.
Robert Lytton [Tue, 11 Feb 2014 10:34:51 +0000 (10:34 +0000)]
XCore target: add section information.

Xcore target ABI requires const data that is externally visible
to be handled differently if it has C-language linkage rather than
C++ language linkage.

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

10 years agoXCore target: Pass through "-fverbose-asm" flag to xcc assembler.
Robert Lytton [Tue, 11 Feb 2014 10:34:45 +0000 (10:34 +0000)]
XCore target: Pass through "-fverbose-asm" flag to xcc assembler.

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

10 years agoclang-format: Support lambdas with namespace-qualified return types.
Daniel Jasper [Tue, 11 Feb 2014 10:16:55 +0000 (10:16 +0000)]
clang-format: Support lambdas with namespace-qualified return types.

E.g.:
  Foo([]()->std::vector<int> { return { 2 }; }());

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

10 years agoclang-format: Fix alignment of comments inside statements.
Daniel Jasper [Tue, 11 Feb 2014 10:08:11 +0000 (10:08 +0000)]
clang-format: Fix alignment of comments inside statements.

Before:
  auto result = SomeObject
                // Calling someFunction on SomeObject
                    .someFunction();

After:
  auto result = SomeObject
                    // Calling someFunction on SomeObject
                    .someFunction();

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

10 years agoAAPCS: Do not split structs after CPRC allocated on stack
Oliver Stannard [Tue, 11 Feb 2014 09:25:50 +0000 (09:25 +0000)]
AAPCS: Do not split structs after CPRC allocated on stack

According to the AAPCS, we can split structs between GPRs and the stack,
except for when an argument has already been allocated on the stack. This
can occur when a large number of floating-point arguments fill up the VFP
registers, and are alllocated on the stack before the general-purpose argument
registers are full.

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

10 years agoFix self-hosted -Werror build: delete comma at the end of enumerator list
Alexey Samsonov [Tue, 11 Feb 2014 08:07:54 +0000 (08:07 +0000)]
Fix self-hosted -Werror build: delete comma at the end of enumerator list

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

10 years agoFix PCH deserialization bug with local static symbols being treated as local extern.
Ted Kremenek [Tue, 11 Feb 2014 06:29:29 +0000 (06:29 +0000)]
Fix PCH deserialization bug with local static symbols being treated as local extern.

This triggered a miscompilation of code using Boost's function_template.hpp
when it was included inside a PCH file.  A local static within
that header would be treated as local extern, resulting in the wrong
mangling.  This only occurred during PCH deserialization.

Fixes <rdar://problem/15975816> and <rdar://problem/15926311>.

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

10 years ago[analyzer] Inline C++ operator new when c++-inline-allocators is turned on.
Jordan Rose [Tue, 11 Feb 2014 02:21:06 +0000 (02:21 +0000)]
[analyzer] Inline C++ operator new when c++-inline-allocators is turned on.

This will let us stage in the modeling of operator new. The -analyzer-config
opton 'c++-inline-allocators' is currently off by default.

Patch by Karthik Bhat!

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

10 years ago[stackprotector] Add command line option -fstack-protector-strong
Josh Magee [Tue, 11 Feb 2014 01:35:14 +0000 (01:35 +0000)]
[stackprotector] Add command line option -fstack-protector-strong

This option has the following effects:
 * It adds the sspstrong IR attribute to each function within the CU.
 * It defines the macro __SSP_STRONG__ with the value of 2.

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

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

10 years ago[AArch64] Fixed vget/vset_lane_f16 implementation
Ana Pazos [Mon, 10 Feb 2014 21:20:53 +0000 (21:20 +0000)]
[AArch64] Fixed vget/vset_lane_f16 implementation

Replaced cast and vreinterepret operations with
code to reinterpret bitwise the types float16_t and
int16_t.

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

10 years agoTests for DR351-370, plus update DR status page to match the latest core issue list.
Richard Smith [Mon, 10 Feb 2014 19:53:17 +0000 (19:53 +0000)]
Tests for DR351-370, plus update DR status page to match the latest core issue list.

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

10 years agoMS ABI: Add support for #pragma pointers_to_members
David Majnemer [Mon, 10 Feb 2014 19:50:15 +0000 (19:50 +0000)]
MS ABI: Add support for #pragma pointers_to_members

Introduce a notion of a 'current representation method' for
pointers-to-members.

When starting out, this is set to 'best case' (representation method is
chosen by examining the class, selecting the smallest representation
that would work given the class definition or lack thereof).

This pragma allows the translation unit to dictate exactly what
representation to use, similar to how the inheritance model keywords
operate.

N.B.  PCH support is forthcoming.

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

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

10 years agoBasic: Clean up malformed pragma diagnostics
David Majnemer [Mon, 10 Feb 2014 19:06:37 +0000 (19:06 +0000)]
Basic: Clean up malformed pragma diagnostics

Create a new diagnostic, -Wignored-pragmas and use it to handle any
case where a pragma would have a side effect but is ignored.

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

10 years agoPR18777: This PR is already fixed; add regtest.
Richard Smith [Mon, 10 Feb 2014 17:21:40 +0000 (17:21 +0000)]
PR18777: This PR is already fixed; add regtest.

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

10 years agoSema: Remove useless MSStructPragmaOn update in Sema::~Sema
David Majnemer [Mon, 10 Feb 2014 17:17:03 +0000 (17:17 +0000)]
Sema: Remove useless MSStructPragmaOn update in Sema::~Sema

No functional change, this code was just superfluous.

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

10 years agoARM: move vshll NEON implementation to common code
Tim Northover [Mon, 10 Feb 2014 16:20:36 +0000 (16:20 +0000)]
ARM: move vshll NEON implementation to common code

Now that both ARM backends use the same implementation for vshll operations,
the code can be shared. This is also a necessary LLVM/Clang interface update.

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

10 years agoARM: implement vshrn NEON intrinsic in terms of shr/trunc
Tim Northover [Mon, 10 Feb 2014 14:04:12 +0000 (14:04 +0000)]
ARM: implement vshrn NEON intrinsic in terms of shr/trunc

Now the backend supports the natural LLVM IR, we can shamelessly steal the
AArch64 front-end code to implement the vshrn intrinsic on 32-bit ARM.

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

10 years agoASTUnit: simplify remapping files by using the exact same logic in Preprocessor
Dmitri Gribenko [Mon, 10 Feb 2014 12:31:34 +0000 (12:31 +0000)]
ASTUnit: simplify remapping files by using the exact same logic in Preprocessor

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

10 years agoFix Clang install rules to not set permissions on include/
NAKAMURA Takumi [Mon, 10 Feb 2014 10:51:09 +0000 (10:51 +0000)]
Fix Clang install rules to not set permissions on include/

The CMake install(DIRECTORY) command documents that it sets permissions
on directories it is asked to install.  Since the <prefix>/include
directory may not be exclusive to the LLVM/Clang installation, we should
not ask CMake to manage permissions of that directory for us.  Instead,
give only our own include/clang and include/clang-c subdirectories to
the install(DIRECTORY) command.

Fixes PR4500. Patch by Brad King.

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

10 years ago[CMake] add_clang_library(): Use llvm_add_library.
NAKAMURA Takumi [Mon, 10 Feb 2014 09:05:28 +0000 (09:05 +0000)]
[CMake] add_clang_library(): Use llvm_add_library.

CMAKE_MODULE_LINKER_FLAGS can be removed since llvm_add_library(MODULE) adds same flags to MODULE.

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

10 years agoPR18685: Ignore class template specializations as potential
Kaelyn Uhrain [Sun, 9 Feb 2014 21:47:04 +0000 (21:47 +0000)]
PR18685: Ignore class template specializations as potential
nested-name-specifiers for typos unless the typo already has
a nested-name-specifier that is a template specialization.

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

10 years ago[libclang] While visiting a C++ destructor decl, keep the type identifier associated...
Argyrios Kyrtzidis [Sun, 9 Feb 2014 08:13:47 +0000 (08:13 +0000)]
[libclang] While visiting a C++ destructor decl, keep the type identifier associated with the decl,
don't turn it into a type ref.

rdar://15907618

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

10 years agoClarify comment. Remove braces from single-statement block.
David Blaikie [Sun, 9 Feb 2014 07:24:41 +0000 (07:24 +0000)]
Clarify comment. Remove braces from single-statement block.

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

10 years agoImprove diagnostic for using non-class/namespace/scoped enum in a nested name specifier.
David Blaikie [Sun, 9 Feb 2014 06:54:23 +0000 (06:54 +0000)]
Improve diagnostic for using non-class/namespace/scoped enum in a nested name specifier.

Rather than simply saying "X is not a class or namespace", clarify what
X is by providing the aka type in the case where X is a type, or
pointing to the named declaration if there's an unambiguous one to refer
to. In the ambiguous case, the ambiguities are already enumerated
(though could be clarified by describing what kind of entities they are)

Included a few FIXMEs in tests where some further improvements could be
made.

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

10 years agoPreprocessor: Add __ALIGNOF_MAX_ALIGN_T__
David Majnemer [Sun, 9 Feb 2014 05:30:48 +0000 (05:30 +0000)]
Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__

TargetInfo::getSuitableAlign() was introduced in r146762 and is defined
as alignof(std::max_align_t).

Introduce __ALIGNOF_MAX_ALIGN_T__ which exposes getSuitableAlign() so
that libc++ may take advantage of it.

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

10 years agoPR16519, PR18009: When checking a partial specialization for uses of its own
Richard Smith [Sun, 9 Feb 2014 00:54:43 +0000 (00:54 +0000)]
PR16519, PR18009: When checking a partial specialization for uses of its own
template parameters, don't look for parameters of outer templates. If a problem
is found in a default template argument, point the diagnostic at the partial
specialization (with a note pointing at the default argument) instead of
pointing it at the default argument and leaving it unclear which partial
specialization os problematic.

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

10 years agotype_info objects are not unnamed_addr: the ABI requires us to
John McCall [Sat, 8 Feb 2014 03:26:05 +0000 (03:26 +0000)]
type_info objects are not unnamed_addr: the ABI requires us to
unique them and permits the implementation of dynamic_cast (and
anything else which knows it's working with a complete class
type) to compare their addresses directly.

rdar://16005328

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

10 years agoMove the -fms-compatibility using decl check after real access checking
Reid Kleckner [Sat, 8 Feb 2014 02:40:20 +0000 (02:40 +0000)]
Move the -fms-compatibility using decl check after real access checking

Summary:
This avoids false positives from -Wmicrosoft when name lookup would
normally succeed in standard C++.  This triggered on a common CRTP
pattern in clang, where a derived class would have a private using decl
to pull in members of a dependent base:

class Verifier : InstVisitor<Verifier> {
private:
  using InstVisitor<Verifier>::visit;
  ...
  void anything() {
    visit(); // warned here
  }
};

Real access checks pass here because we're in the context of the
Verifier, but the -Wmicrosoft extension was just looking for the private
access specifier.

Reviewers: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2679

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

10 years agoPR18581: Attempt to complete the type in a VLA declaration before checking
Richard Smith [Sat, 8 Feb 2014 02:30:49 +0000 (02:30 +0000)]
PR18581: Attempt to complete the type in a VLA declaration before checking
whether it's POD.

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

10 years agoclang-cl: Alias /Zi and /Z7 to -gline-tables-only
Reid Kleckner [Sat, 8 Feb 2014 01:43:16 +0000 (01:43 +0000)]
clang-cl: Alias /Zi and /Z7 to -gline-tables-only

LLVM only knows how to emit Z7-style line tables on -win32, so there's
no reason for clang to emit anything other than line info.

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

10 years agoMS ABI: Use the most recent decl to check the inheritance model
Reid Kleckner [Sat, 8 Feb 2014 01:15:37 +0000 (01:15 +0000)]
MS ABI: Use the most recent decl to check the inheritance model

This was crashing compilation of DeclContext::buildLookupImpl<>.

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

10 years agoFix lifetime issue causing buildbot failures.
Richard Smith [Sat, 8 Feb 2014 00:42:45 +0000 (00:42 +0000)]
Fix lifetime issue causing buildbot failures.

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

10 years agoRemove the -fhidden-weak-vtables -cc1 option. It was dead,
John McCall [Sat, 8 Feb 2014 00:41:16 +0000 (00:41 +0000)]
Remove the -fhidden-weak-vtables -cc1 option.  It was dead,
gross, and increasingly replaced through other mechanisms.

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

10 years agoASTUnit: remove dead code in remapping files
Dmitri Gribenko [Sat, 8 Feb 2014 00:38:15 +0000 (00:38 +0000)]
ASTUnit: remove dead code in remapping files

ASTUnit contains code to remap files to other files on disk.  This code is not
used.  We only remap files to MemoryBuffers.

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

10 years ago[analyzer] Objective-C object literals are always non-nil.
Jordan Rose [Sat, 8 Feb 2014 00:04:14 +0000 (00:04 +0000)]
[analyzer] Objective-C object literals are always non-nil.

<rdar://problem/15999214>

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

10 years agoPR16638, DR1552: the exception specification on an implicitly-declared
Richard Smith [Fri, 7 Feb 2014 22:51:16 +0000 (22:51 +0000)]
PR16638, DR1552: the exception specification on an implicitly-declared
'operator delete' or 'operator delete[]' is an explicit exception
specification. Therefore we should diagnose 'void operator delete(void*)'
instead of 'void operator delete(void*) noexcept'.

This diagnostic remains an ExtWarn, since in practice people don't always
include the exception specification in such a declaration.

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

10 years agoFold together two repeated identical 'if's.
Richard Smith [Fri, 7 Feb 2014 22:39:53 +0000 (22:39 +0000)]
Fold together two repeated identical 'if's.

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

10 years agoFix test from r200979 on Windows
Ben Langmuir [Fri, 7 Feb 2014 19:39:50 +0000 (19:39 +0000)]
Fix test from r200979 on Windows

Hopefully the last tweak needed to get this test working everywhere.

Remove matching of the prefix of sys_header.h, which was never the point
of the test anyway.  This avoids dealing with path separators.

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

10 years agoObjective-C. Revert patch r193003 for further
Fariborz Jahanian [Fri, 7 Feb 2014 19:25:10 +0000 (19:25 +0000)]
Objective-C. Revert patch r193003 for further
internal discussions. // rdar://16006401

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

10 years agoFix test from r200979 on non-Darwin systems
Ben Langmuir [Fri, 7 Feb 2014 17:56:29 +0000 (17:56 +0000)]
Fix test from r200979 on non-Darwin systems

Add a darwin triple to get the behaviour from isysroot that the test
expects.

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

10 years ago[analyzer] Just silence all warnings coming out of std::basic_string.
Jordan Rose [Fri, 7 Feb 2014 17:35:04 +0000 (17:35 +0000)]
[analyzer] Just silence all warnings coming out of std::basic_string.

This means always walking the whole call stack for the end path node, but
we'll assume that's always fairly tractable.

<rdar://problem/15952973>

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

10 years agoStat system dependencies when using -verify-pch
Ben Langmuir [Fri, 7 Feb 2014 17:31:11 +0000 (17:31 +0000)]
Stat system dependencies when using -verify-pch

We don't stat the system headers to check for stalenes during regular
PCH loading for performance reasons.  When explicitly saying
-verify-pch, we want to check all the dependencies - user or system.

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

10 years agoASTUnit: ArrayRef'ize RemappedFiles
Dmitri Gribenko [Fri, 7 Feb 2014 15:00:22 +0000 (15:00 +0000)]
ASTUnit: ArrayRef'ize RemappedFiles

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

10 years agoclang-format: Fix column limit violation for merged lines in macros.
Daniel Jasper [Fri, 7 Feb 2014 13:45:27 +0000 (13:45 +0000)]
clang-format: Fix column limit violation for merged lines in macros.

Before (81 columns):
  #define A                                                                       \
    void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() { return aaaaaaaa; } \
    int i;

After:
  #define A                                                    \
    void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() { \
      return aaaaaaaa;                                         \
    }                                                          \
    int i;

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

10 years agoFix AAPCS compliance for HFAs containing doubles and long doubles
Oliver Stannard [Fri, 7 Feb 2014 11:25:57 +0000 (11:25 +0000)]
Fix AAPCS compliance for HFAs containing doubles and long doubles

An HFA is defined as a struct containing floating point values of the
same machine type. In the 32-bit ABI, double and long double have the
same machine type, so a struct with a mixture of these types must be an
HFA (assuming it meets the other criteria).

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

10 years agoclang-format: Fix range-based for-loop formatting.
Daniel Jasper [Fri, 7 Feb 2014 10:09:46 +0000 (10:09 +0000)]
clang-format: Fix range-based for-loop formatting.

Before:
  for (aaaaaaaaa aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaa.aaaaaaaaaaaa()
           .aaaaaaaaa()
           .a()) {
  }

After:
  for (aaaaaaaaa aaaaaaaaaaaaaaaaaaaaa :
       aaaaaaaaaaaa.aaaaaaaaaaaa().aaaaaaaaa().a()) {
  }

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

10 years agoDocument return value for FileManager::getNoncachedStatValue()
Dmitri Gribenko [Fri, 7 Feb 2014 09:31:00 +0000 (09:31 +0000)]
Document return value for FileManager::getNoncachedStatValue()

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

10 years agoRevert r194097: "With this patch -Wwrite-strings is still implemented with the terrible
Argyrios Kyrtzidis [Fri, 7 Feb 2014 08:33:28 +0000 (08:33 +0000)]
Revert r194097: "With this patch -Wwrite-strings is still implemented with the terrible
    hack of passing -fconst-strings to -cc1"

Passing or not a language option based on diagnostic settings is a bad idea, it breaks
using a PCH that was compiled with different diagnostic settings.

Also add a test case to make sure we don't regress.

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