]> granicus.if.org Git - clang/log
clang
9 years agoFix crash in EmitDeclMetadata mode
Keno Fischer [Thu, 5 Nov 2015 23:18:44 +0000 (23:18 +0000)]
Fix crash in EmitDeclMetadata mode

Summary: This fixes a bug that's easily encountered in LLDB
(https://llvm.org/bugs/show_bug.cgi?id=22875). The problem here is that we
mangle a name during debug info emission, but never actually emit the actual
Decl, so we run into problems in EmitDeclMetadata (which assumes such a Decl
exists). Fix that by just skipping metadata emissions for mangled names that
don't have associated Decls.

Reviewers: rjmccall

Subscribers: labath, cfe-commits

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

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

9 years agoBetter link for Library Fundamentals TS.
Richard Smith [Thu, 5 Nov 2015 22:21:52 +0000 (22:21 +0000)]
Better link for Library Fundamentals TS.

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

9 years agoCodeGen: Update for debug info API change.
Peter Collingbourne [Thu, 5 Nov 2015 22:04:14 +0000 (22:04 +0000)]
CodeGen: Update for debug info API change.

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

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

9 years agoFix incorrect status for P0012R1.
Richard Smith [Thu, 5 Nov 2015 21:42:32 +0000 (21:42 +0000)]
Fix incorrect status for P0012R1.

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

9 years agoFix CSS style name.
Richard Smith [Thu, 5 Nov 2015 21:42:07 +0000 (21:42 +0000)]
Fix CSS style name.

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

9 years agoUpdate C++ status page to match motions from Kona.
Richard Smith [Thu, 5 Nov 2015 21:41:06 +0000 (21:41 +0000)]
Update C++ status page to match motions from Kona.

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

9 years agoPR25368: Replace workaround for build failure with modules enabled with a fix
Richard Smith [Thu, 5 Nov 2015 21:16:22 +0000 (21:16 +0000)]
PR25368: Replace workaround for build failure with modules enabled with a fix
for the root cause. The 'using llvm::isa;' declaration in Basic/LLVM.h only
pulls the declarations of llvm::isa that were declared prior to it into
namespace clang. In a modules build, this is a hermetic set of just the
declarations from LLVM. In a non-modules build, we happened to also pull the
declaration from lib/CodeGen/Address.h into namespace clang, which made the
code in question accidentally compile.

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

9 years agoImprove macro dumping to preserve semantically-relevant spelling information.
Richard Smith [Thu, 5 Nov 2015 20:55:14 +0000 (20:55 +0000)]
Improve macro dumping to preserve semantically-relevant spelling information.

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

9 years ago[WebAssembly] Update wasm builtin functions to match spec changes.
Dan Gohman [Thu, 5 Nov 2015 20:16:37 +0000 (20:16 +0000)]
[WebAssembly] Update wasm builtin functions to match spec changes.

The page_size operator has been removed from the spec, and the resize_memory
operator has been changed to grow_memory.

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

9 years agoAfter some discussion, promote -fobjc-weak to a driver option.
John McCall [Thu, 5 Nov 2015 19:19:56 +0000 (19:19 +0000)]
After some discussion, promote -fobjc-weak to a driver option.

rdar://problem/23415863

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

9 years ago[analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegions
Devin Coughlin [Thu, 5 Nov 2015 18:56:42 +0000 (18:56 +0000)]
[analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegions

Update RegionStoreManager::getBinding() to return UnknownVal when trying to get
the binding for a BlockDataRegion. Previously, getBinding() would try to cast the
BlockDataRegion to a TypedValueRegion and crash. This happened when a block
was passed as a parameter to an inlined function for which
StackHintGeneratorForSymbol::getMessage() tried to generate a stack hint message.

rdar://problem/21291971

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

9 years ago[ARM] Clang gives unintended warning message for 'mthumb' + M-profiles:
Alexandros Lamprineas [Thu, 5 Nov 2015 17:11:55 +0000 (17:11 +0000)]
[ARM] Clang gives unintended warning message for 'mthumb' + M-profiles:

$ clang --target=armv7m-none-eabi -mthumb -march=armv7-m -c test.c
clang-3.8: warning: argument unused during compilation: '-mthumb'

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

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

9 years agoAllow use of private headers in different sub-modules.
Manuel Klimek [Thu, 5 Nov 2015 15:24:47 +0000 (15:24 +0000)]
Allow use of private headers in different sub-modules.

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

9 years ago[x86] Additional small fix for MCU psABI support
Andrey Bokhanko [Thu, 5 Nov 2015 12:43:09 +0000 (12:43 +0000)]
[x86] Additional small fix for MCU psABI support

This patch fixes one more thing in MCU psABI support: LongDoubleWidth should be set to 64.

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

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

9 years agoUse profile data template file for covmap func record (NFC)
Xinliang David Li [Thu, 5 Nov 2015 05:46:39 +0000 (05:46 +0000)]
Use profile data template file for covmap func record (NFC)

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

9 years agoMake ArgumentAdjuster aware of the current file being processed.
Alexander Kornienko [Thu, 5 Nov 2015 02:19:53 +0000 (02:19 +0000)]
Make ArgumentAdjuster aware of the current file being processed.

Summary:
This is needed to handle per-project configurations when adding extra
arguments in clang-tidy for example.

Reviewers: klimek, djasper

Subscribers: djasper, cfe-commits, klimek

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

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

9 years agoTestModuleFileExtension.cpp: Include <cstdio> explicitly for fprintf(3).
NAKAMURA Takumi [Thu, 5 Nov 2015 01:34:19 +0000 (01:34 +0000)]
TestModuleFileExtension.cpp: Include <cstdio> explicitly for fprintf(3).

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

9 years ago[modules] Don't merge an anonymous enum definition into a named enum definition.
Richard Smith [Thu, 5 Nov 2015 01:30:19 +0000 (01:30 +0000)]
[modules] Don't merge an anonymous enum definition into a named enum definition.

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

9 years agoFix build break
David Majnemer [Thu, 5 Nov 2015 01:10:42 +0000 (01:10 +0000)]
Fix build break

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

9 years ago[Lex] Add __has_builtin support for __make_integer_seq
David Majnemer [Thu, 5 Nov 2015 01:01:47 +0000 (01:01 +0000)]
[Lex] Add __has_builtin support for __make_integer_seq

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

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

9 years ago[modules] If we're given a module file, via -fmodule-file=, for a module, but
Richard Smith [Thu, 5 Nov 2015 00:54:55 +0000 (00:54 +0000)]
[modules] If we're given a module file, via -fmodule-file=, for a module, but
we can't load that file due to a configuration mismatch, and implicit module
building is disabled, and the user turns off the error-by-default warning for
that situation, then fall back to textual inclusion for the module rather than
giving an error if any of its headers are included.

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

9 years agoFix nullptr crash in -Wthread-safety-beta
Reid Kleckner [Thu, 5 Nov 2015 00:24:01 +0000 (00:24 +0000)]
Fix nullptr crash in -Wthread-safety-beta

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

9 years agoThe control expression for a _Generic selection expression should have
Aaron Ballman [Thu, 5 Nov 2015 00:06:05 +0000 (00:06 +0000)]
The control expression for a _Generic selection expression should have
its type decayed and qualifiers stripped when determining which
selection it matches. Fixes PR16340.

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

9 years agoclang-format: Turn on wrapping before "else" for WebKit style.
Daniel Jasper [Wed, 4 Nov 2015 22:49:32 +0000 (22:49 +0000)]
clang-format: Turn on wrapping before "else" for WebKit style.

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

9 years agoFix some Clang-tidy modernize warnings, other minor fixes.
Eugene Zelenko [Wed, 4 Nov 2015 21:37:17 +0000 (21:37 +0000)]
Fix some Clang-tidy modernize warnings, other minor fixes.

Differential revision: http://reviews.llvm.org/D14311

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

9 years ago[analyzer] Add 'optin' checker package and move localizability checkers into it.
Devin Coughlin [Wed, 4 Nov 2015 21:33:41 +0000 (21:33 +0000)]
[analyzer] Add 'optin' checker package and move localizability checkers into it.

This commit creates a new 'optin' top-level checker package and moves several of
the localizability checkers into it.

This package is for checkers that are not alpha and that would normally be on by
default but where the driver does not have enough information to determine when
they are applicable. The localizability checkers fit this criterion because the
driver cannot determine whether a project is localized or not -- this is best
determined at the IDE or build-system level.

This new package is *not* intended for checkers that are too noisy to be on by
default.

The hierarchy under 'optin' mirrors that in 'alpha': checkers under 'optin'
should be organized in the hierarchy they would have had if they were truly top
level (e.g., optin.osx.cocoa.MyOptInChecker).

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

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

9 years agoFixed a link.
Alexander Kornienko [Wed, 4 Nov 2015 19:42:17 +0000 (19:42 +0000)]
Fixed a link.

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

9 years agoFixed header levels.
Alexander Kornienko [Wed, 4 Nov 2015 19:40:05 +0000 (19:40 +0000)]
Fixed header levels.

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

9 years agoRemoved mentions of clang-modernize, added a short description of clang-tidy.
Alexander Kornienko [Wed, 4 Nov 2015 19:34:55 +0000 (19:34 +0000)]
Removed mentions of clang-modernize, added a short description of clang-tidy.

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

9 years ago[modules] Generalize the workaround for multiple ambiguous definitions of
Richard Smith [Wed, 4 Nov 2015 19:26:32 +0000 (19:26 +0000)]
[modules] Generalize the workaround for multiple ambiguous definitions of
internal linkage entities in different modules from r250884 to apply to all
names, not just function names.

This is really awkward: we don't want to merge internal-linkage symbols from
separate modules, because they might not actually be defining the same entity.
But we don't want to reject programs that use such an ambiguous symbol if those
internal-linkage symbols are in fact equivalent. For now, we're resolving the
ambiguity by picking one of the equivalent definitions as an extension.

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

9 years ago[Concepts] Add diagnostics which fall under [dcl.spec.concept]p1
Nathan Wilson [Wed, 4 Nov 2015 18:18:35 +0000 (18:18 +0000)]
[Concepts] Add diagnostics which fall under [dcl.spec.concept]p1

Summary: Diagnose when the 'concept' specifier is used on a typedef or function parameter.

Reviewers: rsmith, hubert.reinterpretcast, aaron.ballman, faisalv

Subscribers: cfe-commits

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

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

9 years agoclang-cl: Parse the /guard:cf[-] flag (PR25400)
Hans Wennborg [Wed, 4 Nov 2015 16:11:56 +0000 (16:11 +0000)]
clang-cl: Parse the /guard:cf[-] flag (PR25400)

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

9 years agoImproving the diagnostic for cases where the attribute only appertains to a function...
Aaron Ballman [Wed, 4 Nov 2015 16:09:04 +0000 (16:09 +0000)]
Improving the diagnostic for cases where the attribute only appertains to a function with a prototype.

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

9 years agoAllow compound assignment expressions to be contracted when licensed by the language...
Stephen Canon [Wed, 4 Nov 2015 15:25:38 +0000 (15:25 +0000)]
Allow compound assignment expressions to be contracted when licensed by the language or pragma.

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

9 years agoSilence "enumeral and non-enumeral type in conditional expression" warning; NFC.
Aaron Ballman [Wed, 4 Nov 2015 14:43:43 +0000 (14:43 +0000)]
Silence "enumeral and non-enumeral type in conditional expression" warning; NFC.

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

9 years agoInitialize member field.
Erik Verbruggen [Wed, 4 Nov 2015 14:34:43 +0000 (14:34 +0000)]
Initialize member field.

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

9 years ago[Sema] Implement __make_integer_seq
David Majnemer [Wed, 4 Nov 2015 03:40:30 +0000 (03:40 +0000)]
[Sema] Implement __make_integer_seq

This new builtin template allows for incredibly fast instantiations of
templates like std::integer_sequence.

Performance numbers follow:
My work station has 64 GB of ram + 20 Xeon Cores at 2.8 GHz.

__make_integer_seq<std::integer_sequence, int, 90000> takes 0.25
seconds.

std::make_integer_sequence<int, 90000> takes unbound time, it is still
running.  Clang is consuming gigabytes of memory.

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

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

9 years ago[analyzer] Move the ObjCGenericsChecker out of the alpha package.
Devin Coughlin [Tue, 3 Nov 2015 19:38:03 +0000 (19:38 +0000)]
[analyzer] Move the ObjCGenericsChecker out of the alpha package.

It is now in the osx.cocoa package and so will be on by default for Apple
toolchains.

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

9 years agoIntroduce module file extensions to piggy-back data onto module files.
Douglas Gregor [Tue, 3 Nov 2015 18:33:07 +0000 (18:33 +0000)]
Introduce module file extensions to piggy-back data onto module files.

Introduce the notion of a module file extension, which introduces
additional information into a module file at the time it is built that
can then be queried when the module file is read. Module file
extensions are identified by a block name (which must be unique to the
extension) and can write any bitstream records into their own
extension block within the module file. When a module file is loaded,
any extension blocks are matched up with module file extension
readers, that are per-module-file and are given access to the input
bitstream.

Note that module file extensions can only be introduced by
programmatic clients that have access to the CompilerInvocation. There
is only one such extension at the moment, which is used for testing
the module file extension harness. As a future direction, one could
imagine allowing the plugin mechanism to introduce new module file
extensions.

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

9 years agoRevert "Support watchOS and tvOS in compiler-rt builds"
Tim Northover [Tue, 3 Nov 2015 18:14:42 +0000 (18:14 +0000)]
Revert "Support watchOS and tvOS in compiler-rt builds"

The required compiler-rt changes aren't present yet so attempting to
build with compiler-rt breaks. And since we're trying to deprecate
autotools we actually want to fix this in CMake primarily anyway.

This reverts r251712.

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

9 years agoSimplify Sema::ProcessPropertyDecl. NFC
Douglas Gregor [Tue, 3 Nov 2015 17:02:34 +0000 (17:02 +0000)]
Simplify Sema::ProcessPropertyDecl. NFC

Now that the properties created within Objective-C class extensions go
into the extension themselves, we don't need any of the extra
complexity here.

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

9 years agoRemove unused #include
David Majnemer [Tue, 3 Nov 2015 16:32:15 +0000 (16:32 +0000)]
Remove unused #include

No functionality change is intended.

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

9 years agoRemove some legacy mingw-w64 gcc struct info
Martell Malone [Tue, 3 Nov 2015 15:57:45 +0000 (15:57 +0000)]
Remove some legacy mingw-w64 gcc struct info

As of gcc 4.7 mingw-w64 no longer emits 128-bit structs as i128

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

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

9 years ago[X86] Rounding mode for roundps/pd/ss/sd builtins should be an ICE.
Craig Topper [Tue, 3 Nov 2015 07:20:07 +0000 (07:20 +0000)]
[X86] Rounding mode for roundps/pd/ss/sd builtins should be an ICE.

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

9 years agoFix a couple intrinsic header comments. NFC
Craig Topper [Tue, 3 Nov 2015 06:16:31 +0000 (06:16 +0000)]
Fix a couple intrinsic header comments. NFC

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

9 years ago[modules] Rationalize the behavior of Decl::declarationReplaces, and in
Richard Smith [Tue, 3 Nov 2015 03:13:11 +0000 (03:13 +0000)]
[modules] Rationalize the behavior of Decl::declarationReplaces, and in
particular don't assume that two declarations of the same kind in the same
context are declaring the same entity. That's not true when the same name is
declared multiple times as internal-linkage symbols within a module.
(getCanonicalDecl is cheap now, so we can just use it here.)

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

9 years agoEliminate "rewritten decls" from the AST writer. NFC
Douglas Gregor [Tue, 3 Nov 2015 01:20:54 +0000 (01:20 +0000)]
Eliminate "rewritten decls" from the AST writer. NFC

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

9 years agoSwitch to using an explicit scope object to ensure we don't forget to pop ObjC
Richard Smith [Tue, 3 Nov 2015 01:19:56 +0000 (01:19 +0000)]
Switch to using an explicit scope object to ensure we don't forget to pop ObjC
type parameters off the scope, and fix the cases where we failed to do so.

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

9 years agoStop back-patching 'readonly' Objective-C properties with 'readwrite' ones.
Douglas Gregor [Tue, 3 Nov 2015 01:15:46 +0000 (01:15 +0000)]
Stop back-patching 'readonly' Objective-C properties with 'readwrite' ones.

A 'readonly' Objective-C property declared in the primary class can
effectively be shadowed by a 'readwrite' property declared within an
extension of that class, so long as the types and attributes of the
two property declarations are compatible.

Previously, this functionality was implemented by back-patching the
original 'readonly' property to make it 'readwrite', destroying source
information and causing some hideously redundant, incorrect
code. Simplify the implementation to express how this should actually
be modeled: as a separate property declaration in the extension that
shadows (via the name lookup rules) the declaration in the primary
class. While here, correct some broken Fix-Its, eliminate a pile of
redundant code, clean up the ARC migrator's handling of properties
declared in extensions, and fix debug info's naming of methods that
come from categories.

A wonderous side effect of doing this write is that it eliminates the
"AddedObjCPropertyInClassExtension" method from the AST mutation
listener, which in turn eliminates the last place where we rewrite
entire declarations in a chained PCH file or a module file. This
change (which fixes rdar://problem/18475765) will allow us to
eliminate the rewritten-decls logic from the serialization library,
and fixes a crash (rdar://problem/23247794) illustrated by the
test/PCH/chain-categories.m example.

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

9 years agoRemove empty directories.
Alexander Kornienko [Mon, 2 Nov 2015 22:24:28 +0000 (22:24 +0000)]
Remove empty directories.

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

9 years agoMake hasLHS and hasRHS matchers available for ArraySubscriptExpr
Alexander Kornienko [Mon, 2 Nov 2015 22:23:21 +0000 (22:23 +0000)]
Make hasLHS and hasRHS matchers available for ArraySubscriptExpr

Summary:
The hasBase and hasIndex don't tell anything about the position of the
base and the index in the code, so we need hasLHS and hasRHS in some cases.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

9 years agowatchOS & tvOS: add a few more tests.
Tim Northover [Mon, 2 Nov 2015 21:14:48 +0000 (21:14 +0000)]
watchOS & tvOS: add a few more tests.

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

9 years ago[PTH] Fix data length used for stat cache entries
Reid Kleckner [Mon, 2 Nov 2015 20:47:31 +0000 (20:47 +0000)]
[PTH] Fix data length used for stat cache entries

This came up in a boost build, which apparently uses PTH. This was
broken in r187619 when we migrated it to uses llvm::fs instead of raw
stat calls.

Constructing a test case with a hash table collision in-tree is tough.
Instead, I have a pending change to OnDiskChainedHashTable that asserts
that the reported length of the data agrees with the data actually
written. All of the existing in-tree tests find the bug with this
assert.

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

9 years agoclang-format: Simplify and improve stop condition for formatting
Daniel Jasper [Mon, 2 Nov 2015 20:02:49 +0000 (20:02 +0000)]
clang-format: Simplify and improve stop condition for formatting
unaffected lines with incorrect initial indent.

Starting from:
  namespace {
    int i; // There shouldn't be indentation here.
    int j; // <- call clang-format on this line.
  }

Before:
  namespace {
    int i;
    int j;
    }

After:
  namespace {
    int i;
    int j;
  }

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

9 years agoFix va_arg on watchOS.
Tim Northover [Mon, 2 Nov 2015 19:32:23 +0000 (19:32 +0000)]
Fix va_arg on watchOS.

As in other contexts, alignments can go up to 16 bytes in a va_list.

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

9 years agoClang format a few prior patches (NFC)
Teresa Johnson [Mon, 2 Nov 2015 18:03:12 +0000 (18:03 +0000)]
Clang format a few prior patches (NFC)

I had clang formatted my earlier patches using the wrong style.
Reformatted with the LLVM style.

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

9 years agoSink some PTHManager includes out of Preprocessor.h
Reid Kleckner [Mon, 2 Nov 2015 17:53:55 +0000 (17:53 +0000)]
Sink some PTHManager includes out of Preprocessor.h

This reduces the number of .cpp files needed to be rebuilt after
touching OnDiskHashTable from 120 to 21 for me.

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

9 years ago[x86] Front-end part of MCU psABI support
Andrey Bokhanko [Mon, 2 Nov 2015 09:54:17 +0000 (09:54 +0000)]
[x86] Front-end part of MCU psABI support

This patch implements two things in front-end for MCU psABI support:

1) "long double type is the same as double."
2) "New predefined C/C++ pre-processor symbols: iamcu and iamcu__.

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

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

9 years ago[MS ABI] Don't zero-initialize vbptrs in bases
David Majnemer [Mon, 2 Nov 2015 09:01:44 +0000 (09:01 +0000)]
[MS ABI] Don't zero-initialize vbptrs in bases

Certain CXXConstructExpr nodes require zero-initialization before a
constructor is called.  We had a bug in the case where the constructor
is called on a virtual base: we zero-initialized the base's vbptr field.
A complementary bug is present in MSVC where no zero-initialization
occurs for the subobject at all.

This fixes PR25370.

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

9 years agoclang-format: Be slightly more cautious when formatting subsequent lines after a...
Daniel Jasper [Sun, 1 Nov 2015 00:27:35 +0000 (00:27 +0000)]
clang-format: Be slightly more cautious when formatting subsequent lines after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing closing brace, e.g. while writing code in an editor.

Summary:
With this change, clang-format stops formatting when either it leaves
the current scope or when it comes back to the initial scope after
going into a nested one.

Reviewers: klimek

Subscribers: cfe-commits, klimek

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

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

9 years ago[MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff...
David Majnemer [Sat, 31 Oct 2015 08:42:14 +0000 (08:42 +0000)]
[MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibility

We permit implicit conversion from pointer-to-function to
pointer-to-object when -fms-extensions is specified.  This is rather
unfortunate, move this into -fms-compatibility and only permit it within
system headers unless -Wno-error=microsoft-cast is specified.

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

9 years ago[CodeGen] Call SetInternalFunctionAttributes to attach function
Akira Hatanaka [Sat, 31 Oct 2015 01:28:07 +0000 (01:28 +0000)]
[CodeGen] Call SetInternalFunctionAttributes to attach function
attributes to internal functions.

This patch fixes CodeGenModule::CreateGlobalInitOrDestructFunction to
use SetInternalFunctionAttributes instead of SetLLVMFunctionAttributes
to attach function attributes to internal functions.

Also, make sure the correct CGFunctionInfo is passed instead of always
passing what arrangeNullaryFunction returns.

rdar://problem/20828324

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

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

9 years agoSema: correct typo recovery with blocks
Saleem Abdulrasool [Sat, 31 Oct 2015 00:39:15 +0000 (00:39 +0000)]
Sema: correct typo recovery with blocks

Handle blocks in the tree transform for the typo correction as otherwise, the
capture may miss.  This would trigger an assertion.  Thanks to Doug Gregor for
the help with this!

Fixes PR25001.

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

9 years agoCGExprConstant.cpp: Appease Modules.
NAKAMURA Takumi [Fri, 30 Oct 2015 16:37:27 +0000 (16:37 +0000)]
CGExprConstant.cpp: Appease Modules.

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

9 years agoSupport watchOS and tvOS in compiler-rt builds
Tim Northover [Fri, 30 Oct 2015 16:30:51 +0000 (16:30 +0000)]
Support watchOS and tvOS in compiler-rt builds

Hopefully autotools will be deprecated soon and this entire file can go away,
but until then...

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

9 years agoSupport tvOS and watchOS availability attributes
Tim Northover [Fri, 30 Oct 2015 16:30:49 +0000 (16:30 +0000)]
Support tvOS and watchOS availability attributes

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

9 years agoARMv7k: implement ABI changes for watchOS from standard iOS.
Tim Northover [Fri, 30 Oct 2015 16:30:45 +0000 (16:30 +0000)]
ARMv7k: implement ABI changes for watchOS from standard iOS.

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

9 years agoDisable SjLj exceptions for watchOS
Tim Northover [Fri, 30 Oct 2015 16:30:41 +0000 (16:30 +0000)]
Disable SjLj exceptions for watchOS

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

9 years agoWatch and TV OS: wire up basic ABI choices
Tim Northover [Fri, 30 Oct 2015 16:30:36 +0000 (16:30 +0000)]
Watch and TV OS: wire up basic ABI choices

This sets the mostly expected Darwin default ABI options for these two
platforms. Active changes from these defaults for watchOS are in a later patch.

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

9 years agoPreprocessor: define correct tvOS and watchOS version macros
Tim Northover [Fri, 30 Oct 2015 16:30:30 +0000 (16:30 +0000)]
Preprocessor: define correct tvOS and watchOS version macros

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

9 years agoSupport watchOS and tvOS driver options
Tim Northover [Fri, 30 Oct 2015 16:30:27 +0000 (16:30 +0000)]
Support watchOS and tvOS driver options

This patch should add support for almost all command-line options and
driver tinkering necessary to produce a correct "clang -cc1"
invocation for watchOS and tvOS.

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

9 years agoModules: Add a declaration in clang/Serialization/GlobalModuleIndex.h.
NAKAMURA Takumi [Fri, 30 Oct 2015 15:54:34 +0000 (15:54 +0000)]
Modules: Add a declaration in clang/Serialization/GlobalModuleIndex.h.

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

9 years agoReapply r251621 "[Analyzer] Widening loops which do not exit"
Sean Eveson [Fri, 30 Oct 2015 15:23:57 +0000 (15:23 +0000)]
Reapply r251621 "[Analyzer] Widening loops which do not exit"

It was not the cause of the build bot failure.

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

9 years agoclang/module.modulemap: Exclude Frontend/PCHContainerOperations.h in Clang_Frontend.
NAKAMURA Takumi [Fri, 30 Oct 2015 15:14:55 +0000 (15:14 +0000)]
clang/module.modulemap: Exclude Frontend/PCHContainerOperations.h in Clang_Frontend.

FIXME: It should be dissolved to interface and impl.

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

9 years agoRevert "[mips] Add support for the new mips-mti-linux toolchain."
Vasileios Kalintiris [Fri, 30 Oct 2015 11:28:39 +0000 (11:28 +0000)]
Revert "[mips] Add support for the new mips-mti-linux toolchain."

This reverts commits r251633. I'll investigate the test failure off trunk in
order to keep the buildbots clean.

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

9 years agoRevert r251621 "[Analyzer] Widening loops which do not exit" (bot failure)
Sean Eveson [Fri, 30 Oct 2015 11:13:07 +0000 (11:13 +0000)]
Revert r251621 "[Analyzer] Widening loops which do not exit" (bot failure)

Seems to be causing clang-cmake-mips build bot to fail (timeout)

http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/10299

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

9 years agoRevert "Try to run and investigate the mips-mti-linux.c test failure on ARM buildbots."
Renato Golin [Fri, 30 Oct 2015 11:12:36 +0000 (11:12 +0000)]
Revert "Try to run and investigate the mips-mti-linux.c test failure on ARM buildbots."

This reverts commit r251695. Debug is meant to be done off tree, not use the buildbots
experiments. I'll help investigate this problem off trunk.

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

9 years agoTry to run and investigate the mips-mti-linux.c test failure on ARM buildbots.
Vasileios Kalintiris [Fri, 30 Oct 2015 10:35:38 +0000 (10:35 +0000)]
Try to run and investigate the mips-mti-linux.c test failure on ARM buildbots.

This should be a NFC for every toolchain other than mips-mti-linux (where we
print the list of directories searched for crt files). It will soon be
reverted once we hit the clang-cmake-armv7-a15-selfhost-neon buildbot.

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

9 years agoAdd "equalsNode" for types and "isCopyAssignmentOperator" matchers.
Angel Garcia Gomez [Fri, 30 Oct 2015 09:35:51 +0000 (09:35 +0000)]
Add "equalsNode" for types and "isCopyAssignmentOperator" matchers.

Summary: This matchers are going to be used in modernize-use-default, but are generic enough to be placed in ASTMatchers.h.

Reviewers: klimek

Subscribers: alexfh, cfe-commits, klimek

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

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

9 years agoUpdate debug-info-scope test to remove "FIXME", which is fixed in r251689
Dehao Chen [Fri, 30 Oct 2015 05:08:43 +0000 (05:08 +0000)]
Update debug-info-scope test to remove "FIXME", which is fixed in r251689

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

9 years agoFormat: support inline namespaces
Saleem Abdulrasool [Fri, 30 Oct 2015 05:07:56 +0000 (05:07 +0000)]
Format: support inline namespaces

Correct handling for C++17 inline namespaces.  We would previously fail to
identify the inline namespaces as a namespace name since multiple ones may be
concatenated now with C++17.

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

9 years agoInitialize @catch variables correctly in fragile-runtime ARC.
John McCall [Fri, 30 Oct 2015 00:56:02 +0000 (00:56 +0000)]
Initialize @catch variables correctly in fragile-runtime ARC.

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

9 years agoFix the emission of ARC ivar layouts in the non-fragile Mac runtime.
John McCall [Thu, 29 Oct 2015 23:36:14 +0000 (23:36 +0000)]
Fix the emission of ARC ivar layouts in the non-fragile Mac runtime.

My previous change in this area accidentally broke the rule when
InstanceBegin was not a multiple of the word size.

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

9 years agoMark InternalDebugOpt driver options as CoreOptions.
Nico Weber [Thu, 29 Oct 2015 20:53:49 +0000 (20:53 +0000)]
Mark InternalDebugOpt driver options as CoreOptions.

Mostly has the effect of making -ccc-print-phases usable from clang-cl.

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

9 years agoAdd support for __builtin_{add,sub,mul}_overflow.
John McCall [Thu, 29 Oct 2015 20:48:01 +0000 (20:48 +0000)]
Add support for __builtin_{add,sub,mul}_overflow.

Patch by David Grayson!

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

9 years agoSuppress uninteresting output from crash-recovery-modules.m
Nico Weber [Thu, 29 Oct 2015 20:43:31 +0000 (20:43 +0000)]
Suppress uninteresting output from crash-recovery-modules.m

No behavior change, but it makes this test a bit easier to debug when it fails.

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

9 years agoclang-format: [JS] Add goog.setTestOnly to the list of stuff that
Daniel Jasper [Thu, 29 Oct 2015 19:05:20 +0000 (19:05 +0000)]
clang-format: [JS] Add goog.setTestOnly to the list of stuff that
is import-statement-like and shouldn't be wrapped.

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

9 years agoadd support of the latest Ubuntu (Xenial Xerus)
Sylvestre Ledru [Thu, 29 Oct 2015 17:27:55 +0000 (17:27 +0000)]
add support of the latest Ubuntu (Xenial Xerus)

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

9 years agoAdd a link to the DXR project
Ehsan Akhgari [Thu, 29 Oct 2015 17:20:17 +0000 (17:20 +0000)]
Add a link to the DXR project

DXR is a project developed at Mozilla that implements a code indexing
and browsing utility on top of libclang that has features such as
call graph querying.

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

9 years ago[mips] Add support for the new mips-mti-linux toolchain.
Vasileios Kalintiris [Thu, 29 Oct 2015 15:33:53 +0000 (15:33 +0000)]
[mips] Add support for the new mips-mti-linux toolchain.

The original commit in r249137 added the mips-mti-linux toolchain. However,
the newly added tests of that commit failed in few buildbots. This commit
re-applies the original changes but XFAILs the test file which caused
the buildbot failures. This will allow us to examine what's going wrong
without having to commit/revert large changes.

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

9 years ago[Analyzer] Widening loops which do not exit
Sean Eveson [Thu, 29 Oct 2015 10:04:41 +0000 (10:04 +0000)]
[Analyzer] Widening loops which do not exit

Summary:
Dear All,

We have been looking at the following problem, where any code after the constant bound loop is not analyzed because of the limit on how many times the same block is visited, as described in bugzillas #7638 and #23438. This problem is of interest to us because we have identified significant bugs that the checkers are not locating. We have been discussing a solution involving ranges as a longer term project, but I would like to propose a patch to improve the current implementation.

Example issue:
```
for (int i = 0; i < 1000; ++i) {...something...}
int *p = 0;
*p = 0xDEADBEEF;
```

The proposal is to go through the first and last iterations of the loop. The patch creates an exploded node for the approximate last iteration of constant bound loops, before the max loop limit / block visit limit is reached. It does this by identifying the variable in the loop condition and finding the value which is “one away” from the loop being false. For example, if the condition is (x < 10), then an exploded node is created where the value of x is 9. Evaluating the loop body with x = 9 will then result in the analysis continuing after the loop, providing x is incremented.

The patch passes all the tests, with some modifications to coverage.c, in order to make the ‘function_which_gives_up’ continue to give up, since the changes allowed the analysis to progress past the loop.

This patch does introduce possible false positives, as a result of not knowing the state of variables which might be modified in the loop. I believe that, as a user, I would rather have false positives after loops than do no analysis at all. I understand this may not be the common opinion and am interested in hearing your views. There are also issues regarding break statements, which are not considered. A more advanced implementation of this approach might be able to consider other conditions in the loop, which would allow paths leading to breaks to be analyzed.

Lastly, I have performed a study on large code bases and I think there is little benefit in having “max-loop” default to 4 with the patch. For variable bound loops this tends to result in duplicated analysis after the loop, and it makes little difference to any constant bound loop which will do more than a few iterations. It might be beneficial to lower the default to 2, especially for the shallow analysis setting.

Please let me know your opinions on this approach to processing constant bound loops and the patch itself.

Regards,

Sean Eveson
SN Systems - Sony Computer Entertainment Group

Reviewers: jordan_rose, krememek, xazax.hun, zaks.anna, dcoughlin

Subscribers: krememek, xazax.hun, cfe-commits

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

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

9 years agoFix a soon to be invalid test
Xinliang David Li [Thu, 29 Oct 2015 04:04:07 +0000 (04:04 +0000)]
Fix a soon to be invalid test

Remove a check that won't be valid when LLVM stops
emitting runtime hook user function.

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

9 years agotest: fix overzealous match
Saleem Abdulrasool [Thu, 29 Oct 2015 03:52:14 +0000 (03:52 +0000)]
test: fix overzealous match

Accidentally made the test too strict.

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

9 years agoDriver: CrossWindows sanitizers link support
Saleem Abdulrasool [Thu, 29 Oct 2015 03:36:45 +0000 (03:36 +0000)]
Driver: CrossWindows sanitizers link support

Add the required libraries to the linker invocation when building with
sanitizers.

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

9 years agoDriver: inline some small arrays
Saleem Abdulrasool [Thu, 29 Oct 2015 03:36:42 +0000 (03:36 +0000)]
Driver:  inline some small arrays

Use an initializer list to remove a couple of small static arrays.  NFC.

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

9 years agoDriver: tweak CrossWindows sanitizer support
Saleem Abdulrasool [Thu, 29 Oct 2015 03:36:38 +0000 (03:36 +0000)]
Driver: tweak CrossWindows sanitizer support

Indicate support for ASAN on the CrossWindows toolchain.  Although this is
insufficient, this at least permits the handling of the driver flag.

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

9 years ago[analyzer] Update analyzer website for release of checker-277.
Devin Coughlin [Thu, 29 Oct 2015 01:23:57 +0000 (01:23 +0000)]
[analyzer] Update analyzer website for release of checker-277.

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

9 years ago[Sema] Implement -Wdouble-promotion for clang.
George Burgess IV [Thu, 29 Oct 2015 00:28:52 +0000 (00:28 +0000)]
[Sema] Implement -Wdouble-promotion for clang.

GCC has a warning called -Wdouble-promotion, which warns you when
an implicit conversion increases the width of a floating point type.

This is useful when writing code for architectures that can perform
hardware FP ops on floats, but must fall back to software emulation for
larger types (i.e. double, long double).

This fixes PR15109 <https://llvm.org/bugs/show_bug.cgi?id=15109>.

Thanks to Carl Norum for the patch!

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

9 years ago[WinEH] Mark calls inside cleanups as noinline
Reid Kleckner [Wed, 28 Oct 2015 23:06:42 +0000 (23:06 +0000)]
[WinEH] Mark calls inside cleanups as noinline

This works around PR25162. The MSVC tables make it very difficult to
correctly inline a C++ destructor that contains try / catch.  We've
attempted to address PR25162 in LLVM's backend, but it feels pretty
infeasible.  MSVC and ICC both appear to avoid inlining such complex
destructors.

Long term, we want to fix this by making the inliner smart enough to
know when it is inlining into a cleanup, so it can inline simple
destructors (~unique_ptr and ~vector) while avoiding destructors
containing try / catch.

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

9 years agoFix the calling convention of Mingw64 long double values
Reid Kleckner [Wed, 28 Oct 2015 22:29:52 +0000 (22:29 +0000)]
Fix the calling convention of Mingw64 long double values

GCC uses the x87DoubleExtended model for long doubles, and passes them
indirectly by address through function calls.

Also replace the existing mingw-long-double assembly emitting test with
an IR-level test.

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