]> granicus.if.org Git - clang/log
clang
10 years agounique_ptr-ify CompilerInstance::takeSema
David Blaikie [Sun, 10 Aug 2014 19:14:48 +0000 (19:14 +0000)]
unique_ptr-ify CompilerInstance::takeSema

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

10 years agostd::unique_ptr-ify the result of ASTUnit::LoadFromASTFile
David Blaikie [Sun, 10 Aug 2014 19:08:04 +0000 (19:08 +0000)]
std::unique_ptr-ify the result of ASTUnit::LoadFromASTFile

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

10 years agounique_ptr-ify FrontendAction::takeCurrentASTUnit
David Blaikie [Sun, 10 Aug 2014 17:03:42 +0000 (17:03 +0000)]
unique_ptr-ify FrontendAction::takeCurrentASTUnit

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

10 years agounique_ptr-ify FileSystemStatCache::takeNextStatCache
David Blaikie [Sun, 10 Aug 2014 16:57:11 +0000 (16:57 +0000)]
unique_ptr-ify FileSystemStatCache::takeNextStatCache

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

10 years agounique_ptr-ify ASTReaderListener in the ASTReader
David Blaikie [Sun, 10 Aug 2014 16:54:39 +0000 (16:54 +0000)]
unique_ptr-ify ASTReaderListener in the ASTReader

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

10 years agoModuleMap.h: Prune an obsolete "\param ModuleMap" corresponding to r215268.
NAKAMURA Takumi [Sun, 10 Aug 2014 13:48:47 +0000 (13:48 +0000)]
ModuleMap.h: Prune an obsolete "\param ModuleMap" corresponding to r215268.

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

10 years agoFix PR20444 -- wrong number of vftable slots created when return adjustment thunks...
Timur Iskhodzhanov [Sun, 10 Aug 2014 11:40:51 +0000 (11:40 +0000)]
Fix PR20444 -- wrong number of vftable slots created when return adjustment thunks are needed

Reviewed at http://reviews.llvm.org/D4822

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

10 years ago[modules] When considering merging a newly-declared typedef into an imported
Richard Smith [Sun, 10 Aug 2014 02:20:15 +0000 (02:20 +0000)]
[modules] When considering merging a newly-declared typedef into an imported
one, perform the import if the types match even if the imported declaration is
hidden. Otherwise, NamedDecl::declarationReplaces will drop one of the name
lookup entries, making the typedef effectively inaccessible from one of the
modules that declared it.

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

10 years agoMake this test unsupported when there is no real 'env' from a real shell.
Yaron Keren [Sat, 9 Aug 2014 21:24:04 +0000 (21:24 +0000)]
Make this test unsupported when there is no real 'env' from a real shell.
While the test was already requiring shell-preserves-root (such as the
internal shell), it wasn't aware that the MSYS 1.0 env command knows how
to expand root by itself!

From cmd.exe try:

  env SDKROOT=/ cmd //c echo %SDKROOT%

And get:

  C:/MINGW/MSYS/1.0

To be certain we have a good 'env' program the test now requires a shell.

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

10 years agoActually add the object file, skipped by the directory add.
Joerg Sonnenberger [Sat, 9 Aug 2014 21:06:57 +0000 (21:06 +0000)]
Actually add the object file, skipped by the directory add.

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

10 years agoUse std::unique_ptr to handle transient ownership of UnwrappedLine in ScopedLineState
David Blaikie [Sat, 9 Aug 2014 20:02:07 +0000 (20:02 +0000)]
Use std::unique_ptr to handle transient ownership of UnwrappedLine in ScopedLineState

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

10 years agoUse the correct fallback directory for EABIHF targets on NetBSD/arm.
Joerg Sonnenberger [Sat, 9 Aug 2014 19:01:52 +0000 (19:01 +0000)]
Use the correct fallback directory for EABIHF targets on NetBSD/arm.
From Matt Thomas.

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

10 years agoNetBSD/aarch64 has no libgcc or libstdc++. Drop arm64 tests.
Joerg Sonnenberger [Sat, 9 Aug 2014 18:28:36 +0000 (18:28 +0000)]
NetBSD/aarch64 has no libgcc or libstdc++. Drop arm64 tests.

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

10 years agoFix six tests are failing on Windows after r215241-r215243.
Yaron Keren [Sat, 9 Aug 2014 18:13:01 +0000 (18:13 +0000)]
Fix six tests are failing on Windows after r215241-r215243.

    Clang :: Frontend/iframework.c
    Clang :: Frontend/system-header-prefix.c
    Clang :: Index/annotate-comments-objc.m
    Clang :: Index/annotate-module.m
    Clang :: Index/index-module.m
    Clang :: Index/index-pch-with-module.m
    Clang :: PCH/case-insensitive-include.c

Suprisingly the normalize_separators() was no-op when LLVM_ON_WIN32.
Its replacement native() does change path separators into \ as expected,
breaking these tests.

I had fixed the tests by #ifndef LLVM_ON_WIN32 on the native call,
to match the previous behaviour.
If this logic is not used on Windows host, it might be completely
deleted as there should not be windows path seperators on Linux hosts.

I can't test on Linux but if someone can run tests on Linux after
commenting out the line

  llvm::sys::path::native(NormalizedPath);

and the tests pass, the whole if (LangOpts.MSVCCompat) could be deleted.

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

10 years agoFix PR20479 -- missing vftable slots in case of virtual inheritance vs return adjusti...
Timur Iskhodzhanov [Sat, 9 Aug 2014 17:08:06 +0000 (17:08 +0000)]
Fix PR20479 -- missing vftable slots in case of virtual inheritance vs return adjusting thunks

Reviewed at http://reviews.llvm.org/D4829

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

10 years agoRevert "Add tests for coverage mapping generation."
Justin Bogner [Sat, 9 Aug 2014 03:55:09 +0000 (03:55 +0000)]
Revert "Add tests for coverage mapping generation."

I reverted one of the added tests from r215261 in r215274, since it
was failing on quite a few bots. It looks like this wasn't sufficient,
as we're still getting failures on windows, like the following:

    http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/5378

I'm reverting this entire commit so the bots aren't blocked on these
failures.

This reverts commit r215261.

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

10 years agoRevert a failing test from r215261
Justin Bogner [Sat, 9 Aug 2014 01:40:59 +0000 (01:40 +0000)]
Revert a failing test from r215261

The (new) CoverageMapping/macroparams.c test is failing on a number of
buildbots. Reverting it until Alex can investigate and fix the test.

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

10 years ago[modules] Weaken an out-of-date assertion: an #undef can have no location if we
Richard Smith [Sat, 9 Aug 2014 01:24:07 +0000 (01:24 +0000)]
[modules] Weaken an out-of-date assertion: an #undef can have no location if we
imported it from a module when performing finalization before writing out
an AST file.

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

10 years agoRefactor the module map file used for uniquing a module name out of
Ben Langmuir [Sat, 9 Aug 2014 00:57:23 +0000 (00:57 +0000)]
Refactor the module map file used for uniquing a module name out of

class Module. It's almost always going to be the same as
getContainingModule() for top-level modules, so just add a map to cover
the remaining cases.  This lets us do less bookkeeping to keep the
ModuleMap fields up to date.

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

10 years agoRemove some transient raw pointer ownership in ClangAttrEmitter::createArgument
David Blaikie [Fri, 8 Aug 2014 23:59:38 +0000 (23:59 +0000)]
Remove some transient raw pointer ownership in ClangAttrEmitter::createArgument

This function might be a bit easier if it were split in two with a lot
of early returns - and that setOptional bit in the outer function, but
anyway.

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

10 years agoAdd tests for coverage mapping generation.
Alex Lorenz [Fri, 8 Aug 2014 23:49:58 +0000 (23:49 +0000)]
Add tests for coverage mapping generation.

This patch adds the tests for the coverage mapping generation.
Most of the tests check the mapping regions produced by
the generator, and one checks the llvm IR.

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

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

10 years agoAdd predefined macros to identify x86_64h architectures.
Bob Wilson [Fri, 8 Aug 2014 23:46:28 +0000 (23:46 +0000)]
Add predefined macros to identify x86_64h architectures.

Patch by Jim Grosbach.

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

10 years agoPredefine IB_DESIGNABLE and IBInspectable macros. <rdar://problem/17441860>
Bob Wilson [Fri, 8 Aug 2014 23:46:25 +0000 (23:46 +0000)]
Predefine IB_DESIGNABLE and IBInspectable macros. <rdar://problem/17441860>

These macros are used as markers for Interface Builder and need to be defined
to empty strings since they have no impact on the code.

Patch by Ted Kremenek.

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

10 years agoAdd a cc1 "dump-coverage-mapping" for testing coverage mapping.
Alex Lorenz [Fri, 8 Aug 2014 23:41:24 +0000 (23:41 +0000)]
Add a cc1 "dump-coverage-mapping" for testing coverage mapping.

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

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

10 years agoSimplify ownership of ExplodedGraph in the CoreEngine by removing unique_ptr indirection.
David Blaikie [Fri, 8 Aug 2014 23:36:37 +0000 (23:36 +0000)]
Simplify ownership of ExplodedGraph in the CoreEngine by removing unique_ptr indirection.

Summary: I was going to fix the use of raw pointer ownership in "takeGraph" when I realized that function was unused and the whole ExplodedGraph could just be owned by value without the std::unique_ptr indirection at all.

Reviewers: jordan_rose

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

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

10 years agoAdd -link-cxx-sanitizer driver flag.
Alexey Samsonov [Fri, 8 Aug 2014 22:47:17 +0000 (22:47 +0000)]
Add -link-cxx-sanitizer driver flag.

Summary:
This flag can be used to force linking of CXX-specific parts
of sanitizer runtimes into the final executable. It gives more precise
control than --driver-mode=g++ and comes handy when user links several
object files with sanitized C++ code into an executable, but wants
to provide libstdc++ himself, instead of relying on Clang dirver's
behavior.

Test Plan: clang regression test suite

Reviewers: chandlerc, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

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

10 years agoExtend tautological pointer compare and pointer to bool conversion warnings to
Richard Trieu [Fri, 8 Aug 2014 22:41:43 +0000 (22:41 +0000)]
Extend tautological pointer compare and pointer to bool conversion warnings to
macro arguments.

Previously, these warnings skipped any code in a macro expansion.  Preform an
additional check and warn when the expression and context locations are both
in the macro argument.

The most obvious case not caught is passing a pointer directly to a macro,
i.e 'assert(&array)' but 'assert(&array && "valid array")' is caught.  This is
because macro arguments are not typed and the conversion happens inside the
macro.

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

10 years agoObjective-C [qoi]. Issue warning and fixit if property-dot syntax
Fariborz Jahanian [Fri, 8 Aug 2014 22:33:24 +0000 (22:33 +0000)]
Objective-C [qoi]. Issue warning and fixit if property-dot syntax
use mis-cased property name (which is currently accepted silently
due to the way property setters are named). rdar://17911746

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

10 years agoSure-up MemoryBuffer ownership in JSONCompilationDatabase's ctor.
David Blaikie [Fri, 8 Aug 2014 22:01:06 +0000 (22:01 +0000)]
Sure-up MemoryBuffer ownership in JSONCompilationDatabase's ctor.

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

10 years agoChange __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ for versions > 10.9.
Bob Wilson [Fri, 8 Aug 2014 21:45:53 +0000 (21:45 +0000)]
Change __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ for versions > 10.9.

The previous encoding only allowed a single digit for the minor version
number. This changes it to use 2 digits for both the minor version and the
revision number.

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

10 years agoUse llvm::sys::path::native instead of llvm::sys::fs::normalize_separators.
Rafael Espindola [Fri, 8 Aug 2014 21:31:04 +0000 (21:31 +0000)]
Use llvm::sys::path::native instead of llvm::sys::fs::normalize_separators.

llvm::sys::path::native has a superset of the functionality and this was the
only use of llvm::sys::fs::normalize_separators.

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

10 years agoPartially revert r215204 - [mips] Add -mabicalls/-mno-abicalls to the driver
Daniel Sanders [Fri, 8 Aug 2014 18:39:01 +0000 (18:39 +0000)]
Partially revert r215204 - [mips] Add -mabicalls/-mno-abicalls to the driver

It wasn't actually a bug that -mabicalls/-mno-abicalls wasn't being passed to
GAS. The only reason we pass it to the integrated assembler is because it shares
the same framework with CodeGen.

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

10 years agoObjective-C. Minor refactoring of my previous patch.
Fariborz Jahanian [Fri, 8 Aug 2014 18:29:52 +0000 (18:29 +0000)]
Objective-C. Minor refactoring of my previous patch.
rdar://17554063

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

10 years agoObjective-C ARC. Use of non-retain/autorelease API
Fariborz Jahanian [Fri, 8 Aug 2014 17:31:14 +0000 (17:31 +0000)]
Objective-C ARC. Use of non-retain/autorelease API
for building Objective-C array literals in ARC
mode. rdar://17554063

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

10 years agoFix a bug when scan-build is used in a cross-compilation environment with
Sylvestre Ledru [Fri, 8 Aug 2014 17:15:13 +0000 (17:15 +0000)]
Fix a bug when scan-build is used in a cross-compilation environment with
the --use-cc option.

Instead, we will search in the PATH
For example:
 scan-build --use-cc=arm-none-eabi-gcc -o out make -e

Initially reported as a Debian Bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748777

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

10 years agoDebugInfo: Blocks: Do not depend on LLVM argument numbering when choosing the debug...
David Blaikie [Fri, 8 Aug 2014 17:10:14 +0000 (17:10 +0000)]
DebugInfo: Blocks: Do not depend on LLVM argument numbering when choosing the debug info argument numbering.

Due to the possible presence of return-by-out parameters, using the LLVM
argument number count when numbering debug info arguments can end up
off-by-one. This could produce two arguments with the same number, which
would in turn cause LLVM to emit only one of those arguments (whichever
it found last) or assert (r215157).

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

10 years agoCompilationDatabase: Sure-up ownership of compilation databases using std::unique_ptr
David Blaikie [Fri, 8 Aug 2014 16:06:15 +0000 (16:06 +0000)]
CompilationDatabase: Sure-up ownership of compilation databases using std::unique_ptr

Diving into the memory leaks fixed by r213851 there was one case of a
memory leak of a CompilationDatabase due to not properly taking
ownership of the result of "CompilationDatabase::autoDetectFromSource".
Given that both implementations and callers have been using unique_ptr
to own CompilationDatabase objects - make this explicit in the API to
reduce the risk of further leaks.

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

10 years ago[mips] Invert the abicalls feature bit to be noabicalls so that it's possible for...
Daniel Sanders [Fri, 8 Aug 2014 15:47:17 +0000 (15:47 +0000)]
[mips] Invert the abicalls feature bit to be noabicalls so that it's possible for -mno-abicalls to take effect.

Also added the testcase that should have been in r215194.

This behaviour has surprised me a few times now. The problem is that the
generated MipsSubtarget::ParseSubtargetFeatures() contains code like this:

   if ((Bits & Mips::FeatureABICalls) != 0) IsABICalls = true;

so '-abicalls' means 'leave it at the default' and '+abicalls' means 'set it to
true'. In this case, (and the similar -modd-spreg case) I'd like the code to be

  IsABICalls = (Bits & Mips::FeatureABICalls) != 0;

or possibly:

   if ((Bits & Mips::FeatureABICalls) != 0)
     IsABICalls = true;
   else
     IsABICalls = false;

and preferably arrange for 'Bits & Mips::FeatureABICalls' to be true by default
(on some triples).

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

10 years agoExpose the CUDA shared attribute to the C API.
Eli Bendersky [Fri, 8 Aug 2014 14:59:00 +0000 (14:59 +0000)]
Expose the CUDA shared attribute to the C API.

Similar to r209767, which exposed other CUDA-related attributes.

Patch by Rob Springer.

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

10 years ago[mips] Add -mabicalls/-mno-abicalls to the driver
Daniel Sanders [Fri, 8 Aug 2014 13:44:50 +0000 (13:44 +0000)]
[mips] Add -mabicalls/-mno-abicalls to the driver

Based on a patch by Matheus Almeida. I've added testcases and fixed a bug where
the options weren't passed on to GAS.

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

10 years agoAdd missing header guards.
Benjamin Kramer [Fri, 8 Aug 2014 13:24:19 +0000 (13:24 +0000)]
Add missing header guards.

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

10 years agoclang-format: Prefer not to put lambdas on a single line.
Daniel Jasper [Fri, 8 Aug 2014 12:00:13 +0000 (12:00 +0000)]
clang-format: Prefer not to put lambdas on a single line.

Before:
  string abc =
      SomeFunction(aaaaaaaaaaaaa, aaaaa,
                   []() { SomeOtherFunctioooooooooooooooooooooooooon(); });

After:
  string abc = SomeFunction(aaaaaaaaaaaaa, aaaaa, []() {
    SomeOtherFunctioooooooooooooooooooooooooon();
  });

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

10 years agoclangAnalysis: Avoid member initializers in TempDtorContext to appease msc17.
NAKAMURA Takumi [Fri, 8 Aug 2014 09:51:07 +0000 (09:51 +0000)]
clangAnalysis: Avoid member initializers in TempDtorContext to appease msc17.

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

10 years agoFix branch reachabiliy annotation for temp dtor branches.
Manuel Klimek [Fri, 8 Aug 2014 07:37:13 +0000 (07:37 +0000)]
Fix branch reachabiliy annotation for temp dtor branches.

As we only create temp dtor decision branches when a temp dtor needs to
be run (as opposed to for each logical branch in the original
expression), we must include the information about all previous logical
branches when we annotate the temp dtor decision branch.

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

10 years agoParser: Array decls with static but without array size are illformed
David Majnemer [Fri, 8 Aug 2014 07:21:18 +0000 (07:21 +0000)]
Parser: Array decls with static but without array size are illformed

Array declarators involving the static keyword take on two forms:
    D[ static type-qualifier-listopt assignment-expression ]
    D[ type-qualifier-list static assignment-expression ]

Raise a diagnostic if the assignment-expression is missing.

This fixes PR20584.

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

10 years ago[CMake] Upate libdeps in FrontendTests corresponding to r215145.
NAKAMURA Takumi [Fri, 8 Aug 2014 01:26:23 +0000 (01:26 +0000)]
[CMake] Upate libdeps in FrontendTests corresponding to r215145.

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

10 years agoMS ABI: Don't force bases to have an inheritance model
David Majnemer [Fri, 8 Aug 2014 00:10:39 +0000 (00:10 +0000)]
MS ABI: Don't force bases to have an inheritance model

Previously, assigning an inheritance model to a derived class would
trigger further assiginments to the various bases of the class.  This
was done to fix a bug where we couldn't handle an implicit
base-to-derived conversion for pointers-to-members when the conversion
was ambiguous at an earlier point.

However, this is not how the MS scheme works.  Instead, assign
inheritance models to *just* the class which owns to declaration we
ended up referencing.

N.B.  This result is surprising in many ways.  It means that it is
possible for a base to have a "larger" inheritance model than it's
derived classes.  It also means that bases in the conversion path do not
get assigned a model.

struct A { void f(); void f(int); };
struct B : A {};
struct C : B {};
void f() { void (C::*x)() = &A::f; }

We can only begin to assign an inheritance model *after* we've seen the
address-of but *before* we've done the implicit conversion the more
derived pointer-to-member type.  After that point, both 'A' and 'C' will
have an inheritance model but 'B' will not.  Surprising, right?

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

10 years agoMS ABI: Handle member function pointers returning a member data pointer
David Majnemer [Thu, 7 Aug 2014 22:56:13 +0000 (22:56 +0000)]
MS ABI: Handle member function pointers returning a member data pointer

MSVC doesn't decide what the inheritance model for a returned member
pointer *until* a call expression returns it.

This fixes PR20017.

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

10 years agoTemporarily Revert "Update for llvm API change."
Eric Christopher [Thu, 7 Aug 2014 22:09:08 +0000 (22:09 +0000)]
Temporarily Revert "Update for llvm API change."

This reverts commit 215113 to match the reversion in llvm.

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

10 years agoDebug info: Use the vbtable offset for virtual bases in the MS ABI
Reid Kleckner [Thu, 7 Aug 2014 21:29:25 +0000 (21:29 +0000)]
Debug info: Use the vbtable offset for virtual bases in the MS ABI

There are no vtable offset offsets in the MS ABI, but vbtable offsets
are analogous.  There are no consumers of this information yet, but at
least we don't crash now.

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

10 years ago[modules] Don't defer performing updates if we have incomplete redecl chains.
Richard Smith [Thu, 7 Aug 2014 20:58:41 +0000 (20:58 +0000)]
[modules] Don't defer performing updates if we have incomplete redecl chains.
Instead, perform them carefully immediately.

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

10 years agoObjective-C arc. Switch the Objective-C dictionary literal in ARC mode
Fariborz Jahanian [Thu, 7 Aug 2014 20:57:35 +0000 (20:57 +0000)]
Objective-C arc. Switch the Objective-C dictionary literal in ARC mode
to use non-retain/autorelease API variants of ObjC objects. wip.
rdar://17554063

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

10 years agoFlip the order the preprocessor and frontendaction are informed of the end of a file.
Benjamin Kramer [Thu, 7 Aug 2014 20:51:16 +0000 (20:51 +0000)]
Flip the order the preprocessor and frontendaction are informed of the end of a file.

This allows using EndOfMainFile from a PPCallback to access data from the
action. The pattern of PPCallback referencing an action is common in clang-tidy.

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

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

10 years agoRevert "Debug info: Use record layout to find vbase offsets instead of vtables"
Reid Kleckner [Thu, 7 Aug 2014 20:36:48 +0000 (20:36 +0000)]
Revert "Debug info: Use record layout to find vbase offsets instead of vtables"

This reverts commit r215137.

This doesn't work at all, an offset-offset is probably different than an
offset.  I'm scared that this passed our normal test suite.

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

10 years agoDebug info: Use record layout to find vbase offsets instead of vtables
Reid Kleckner [Thu, 7 Aug 2014 19:43:01 +0000 (19:43 +0000)]
Debug info: Use record layout to find vbase offsets instead of vtables

This fixes an assertion when generating full debug info in the MS ABI
for classes with virtual bases.

Fixes PR20579.

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

10 years ago[modules] When emitting an update record containing the body of a destructor,
Richard Smith [Thu, 7 Aug 2014 18:53:08 +0000 (18:53 +0000)]
[modules] When emitting an update record containing the body of a destructor,
also emit the updated 'operator delete' looked up for that destructor. Switch
from UpdateDecl to an actual update record when this happens due to implicitly
defining a special member function and unify this code path and the one for
instantiating a function definition.

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

10 years agotest/Modules: Use FileCheck's -allow-empty instead of "count 0"
Justin Bogner [Thu, 7 Aug 2014 18:45:21 +0000 (18:45 +0000)]
test/Modules: Use FileCheck's -allow-empty instead of "count 0"

Piping stderr into "count 0" in tests doesn't work - things like guard
malloc write to stderr and mess up the count. This comes up all the
time, so I've added a feature to FileCheck to fix it this time.

Fixes test failures caused by r215046 under guard malloc.

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

10 years agoMark successors as reachable/unreachable instead of changing the CFG.
Manuel Klimek [Thu, 7 Aug 2014 18:44:19 +0000 (18:44 +0000)]
Mark successors as reachable/unreachable instead of changing the CFG.

As suggested by Ted, this makes a few warnings less aggressive.

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

10 years agoFix CFG for temporary dtors when the branch taken is known.
Manuel Klimek [Thu, 7 Aug 2014 17:02:21 +0000 (17:02 +0000)]
Fix CFG for temporary dtors when the branch taken is known.

Use the parent context when visiting temporaries when we do not insert a
temporary dtor decision branch.

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

10 years agoModel temporary destructors from logical operators with known values.
Manuel Klimek [Thu, 7 Aug 2014 16:05:51 +0000 (16:05 +0000)]
Model temporary destructors from logical operators with known values.

If the truth value of a LHS is known, we can build the knowledge whether
a temporary destructor is executed or not into the CFG. This is needed
by the return type analysis.

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

10 years agoOnly have one path in the CFG for ternaries if the condition is known.
Manuel Klimek [Thu, 7 Aug 2014 14:25:43 +0000 (14:25 +0000)]
Only have one path in the CFG for ternaries if the condition is known.

The return type analysis requires that the CFG is simplified when the
truth values of branches are statically known at analysis time.

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

10 years agoUpdate for llvm API change.
Rafael Espindola [Thu, 7 Aug 2014 14:23:03 +0000 (14:23 +0000)]
Update for llvm API change.

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

10 years agoRe-applying r214962.
Manuel Klimek [Thu, 7 Aug 2014 10:42:17 +0000 (10:42 +0000)]
Re-applying r214962.

Changes to the original patch:
- model the CFG for temporary destructors in conditional operators so that
  the destructors of the true and false branch are always exclusive. This
  is necessary because we must not have impossible paths for the path
  based analysis to work.
- add multiple regression tests with ternary operators

Original description:
Fix modelling of non-lifetime-extended temporary destructors in the
analyzer.

Changes to the CFG:
When creating the CFG for temporary destructors, we create a structure
that mirrors the branch structure of the conditionally executed
temporary constructors in a full expression.
The branches we create use a CXXBindTemporaryExpr as terminator which
corresponds to the temporary constructor which must have been executed
to enter the destruction branch.

2. Changes to the Analyzer:
When we visit a CXXBindTemporaryExpr we mark the CXXBindTemporaryExpr as
executed in the state; when we reach a branch that contains the
corresponding CXXBindTemporaryExpr as terminator, we branch out
depending on whether the corresponding CXXBindTemporaryExpr was marked
as executed.

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

10 years agoDriver: Add tests for -fprofile-arcs and -fno-profile-arcs
Justin Bogner [Thu, 7 Aug 2014 03:58:32 +0000 (03:58 +0000)]
Driver: Add tests for -fprofile-arcs and -fno-profile-arcs

I tried to be lazy and get away with no test in r215051, but Chad
caught me :)

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

10 years agoDriver: Add -fno-profile-arcs to go with -fprofile-arcs
Justin Bogner [Thu, 7 Aug 2014 03:14:34 +0000 (03:14 +0000)]
Driver: Add -fno-profile-arcs to go with -fprofile-arcs

This is a trivial gcc-compatible change.

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

10 years agoUpdate the context location of the condition of a conditional operator to the
Richard Trieu [Thu, 7 Aug 2014 02:09:05 +0000 (02:09 +0000)]
Update the context location of the condition of a conditional operator to the
question mark instead of the context of the conditional operator.  The
condition does not need the context of the conditional operator at all.

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

10 years agoMake FullExprArg trivially copyable by removing the copy ctor
Reid Kleckner [Thu, 7 Aug 2014 01:00:42 +0000 (01:00 +0000)]
Make FullExprArg trivially copyable by removing the copy ctor

The default copy ctor is good.  This avoids using inalloca for a bunch
of Sema methods when self-hosting.

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

10 years agoUse -Rblah, not -Wblah, to control remark diagnostics. This was always the
Richard Smith [Thu, 7 Aug 2014 00:24:21 +0000 (00:24 +0000)]
Use -Rblah, not -Wblah, to control remark diagnostics. This was always the
intent when we added remark support, but was never implemented in the general
case, because the first -R flags didn't need it. (-Rpass= had special handling
to accomodate its argument.)

-Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark,
or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything
does not affect remarks, and -Reverything does not affect warnings or errors.

The only "real" -R flag we have right now is -Rmodule-build; that flag is
effectively renamed from -Wmodule-build to -Rmodule-build by this change.

-Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and
-Rno-pass by this change; it's not completely clear whether we intended to have
a -Rpass (with no =pattern), but that is unchanged by this commit, other than
the flag name. The default pattern is effectively one which matches no passes.
In future, we may want to make the default pattern be .*, so that -Reverything
works for -Rpass properly.

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

10 years agoAdd back the leading space when printing commands with -###
Reid Kleckner [Thu, 7 Aug 2014 00:05:00 +0000 (00:05 +0000)]
Add back the leading space when printing commands with -###

This was an unintentional behavior change from r214924.

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

10 years agoObjective-C ARC. More code for Objective-C's
Fariborz Jahanian [Wed, 6 Aug 2014 23:40:31 +0000 (23:40 +0000)]
Objective-C ARC. More code for Objective-C's
new APIs for literals. nfc. wip. rdar://17554063

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

10 years agoRevert "Fix modelling of non-lifetime-extended temporary destructors in the analyzer."
Rui Ueyama [Wed, 6 Aug 2014 22:01:54 +0000 (22:01 +0000)]
Revert "Fix modelling of non-lifetime-extended temporary destructors in the analyzer."

This reverts commit r214962 because after the change the
following code doesn't compile with -Wreturn-type -Werror.

  #include <cstdlib>

  class NoReturn {
  public:
    ~NoReturn() __attribute__((noreturn)) { exit(1); }
  };

  int check() {
    true ? NoReturn() : NoReturn();
  }

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

10 years agoObjective-C ARC. Adding declarations for Objective-C's
Fariborz Jahanian [Wed, 6 Aug 2014 20:56:21 +0000 (20:56 +0000)]
Objective-C ARC. Adding declarations for Objective-C's
new APIs for literals. nfc. wip. rdar://17554063

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

10 years agoObjective-C ARC. First patch toward generating new APIs
Fariborz Jahanian [Wed, 6 Aug 2014 18:13:46 +0000 (18:13 +0000)]
Objective-C ARC. First patch toward generating new APIs
for Objective-C's array and dictionary literals.
rdar://17554063. This is wip.

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

10 years agoFormatTokenLexer: Avoid non-static member initializer.
NAKAMURA Takumi [Wed, 6 Aug 2014 16:53:13 +0000 (16:53 +0000)]
FormatTokenLexer: Avoid non-static member initializer.

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

10 years agoRemove unnecessary semicolon.
Manuel Klimek [Wed, 6 Aug 2014 14:21:59 +0000 (14:21 +0000)]
Remove unnecessary semicolon.

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

10 years agoclang-format: Correct SBPO_Always-behavior after function-like keywords
Daniel Jasper [Wed, 6 Aug 2014 14:15:41 +0000 (14:15 +0000)]
clang-format: Correct SBPO_Always-behavior after function-like keywords

Before:
  auto f (int x) -> decltype(x) { return sizeof(x); }
  int g () noexcept(someCall ());
  static_assert(sizeof(char) == 1, "Your compiler is broken");

After:
  auto f (int x) -> decltype (x) { return sizeof (x); }
  int g () noexcept (someCall ());
  static_assert (sizeof (char) == 1, "Your compiler is broken");

This fixes llvm.org/PR20559.
Patch by Roman Kashitsyn, thank you!

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

10 years agoFix sphinx warning.
Dan Liew [Wed, 6 Aug 2014 13:49:33 +0000 (13:49 +0000)]
Fix sphinx warning.

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

10 years agoclang-format: Add special comments to disable formatting.
Daniel Jasper [Wed, 6 Aug 2014 13:40:26 +0000 (13:40 +0000)]
clang-format: Add special comments to disable formatting.

With this patch:
  int ThisWillBeFormatted;
  // clang-format off
  int   ThisWontBeFormatted;
  // clang-format on
  int Formatted;

This is for regions where a significantly nicer code layout can be found
knowing the content of the code.

This fixes llvm.org/PR20463.

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

10 years agoclang-format: Fix indentation in multi-line placement new.
Daniel Jasper [Wed, 6 Aug 2014 13:14:58 +0000 (13:14 +0000)]
clang-format: Fix indentation in multi-line placement new.

Before:
  auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
      new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
      typename aaaaaaaaaaaaaaaaaaaaaaaa();

After:
  auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
      new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
          typename aaaaaaaaaaaaaaaaaaaaaaaa();

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

10 years agoFix modelling of non-lifetime-extended temporary destructors in the analyzer.
Manuel Klimek [Wed, 6 Aug 2014 12:45:51 +0000 (12:45 +0000)]
Fix modelling of non-lifetime-extended temporary destructors in the analyzer.

1. Changes to the CFG:
When creating the CFG for temporary destructors, we create a structure
that mirrors the branch structure of the conditionally executed
temporary constructors in a full expression.
The branches we create use a CXXBindTemporaryExpr as terminator which
corresponds to the temporary constructor which must have been executed
to enter the destruction branch.

2. Changes to the Analyzer:
When we visit a CXXBindTemporaryExpr we mark the CXXBindTemporaryExpr as
executed in the state; when we reach a branch that contains the
corresponding CXXBindTemporaryExpr as terminator, we branch out
depending on whether the corresponding CXXBindTemporaryExpr was marked
as executed.

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

10 years ago[Driver] Add missed include header.
Simon Atanasyan [Wed, 6 Aug 2014 06:04:48 +0000 (06:04 +0000)]
[Driver] Add missed include header.

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

10 years ago[Driver] Move information about toolchain specific include directories
Simon Atanasyan [Wed, 6 Aug 2014 05:44:47 +0000 (05:44 +0000)]
[Driver] Move information about toolchain specific include directories
from the common driver code to the corresponding `MultilibSet` declarations.

Now the `MultilibSet` can hold an optional callback function which is
responsible to return a set of include directories specific for the toolchain.
That allows to remove MIPS toolchain specific directories from
`Linux::AddClangSystemIncludeArgs` method and simplify adding new directories
in the future.

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

10 years agoMS ABI: Mangle lambdas which are given the same mangling number
David Majnemer [Wed, 6 Aug 2014 03:12:47 +0000 (03:12 +0000)]
MS ABI: Mangle lambdas which are given the same mangling number

It is possible for lambdas to get the same mangling number because they
may exist in different mangling contexts.  To handle this correctly,
mangle the context into the name as well.

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

10 years agoRemove trailing whitespaces
Rui Ueyama [Tue, 5 Aug 2014 23:43:21 +0000 (23:43 +0000)]
Remove trailing whitespaces

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

10 years agoMS ABI: Mangle empty type parameter packs compatibly
David Majnemer [Tue, 5 Aug 2014 22:43:45 +0000 (22:43 +0000)]
MS ABI: Mangle empty type parameter packs compatibly

The MS mangling scheme apparently has separate manglings for type and
non-type parameter packs when they are empty.  Match template arguments
with parameters during mangling; check the parameter to see if it was
destined to hold type-ish things or nontype-ish things.

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

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

10 years agoFix Driver tests that I broke on Windows in r214924
Reid Kleckner [Tue, 5 Aug 2014 22:39:07 +0000 (22:39 +0000)]
Fix Driver tests that I broke on Windows in r214924

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

10 years agoExpose the name mangling C API to Python bindings.
Eli Bendersky [Tue, 5 Aug 2014 22:27:50 +0000 (22:27 +0000)]
Expose the name mangling C API to Python bindings.

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

10 years agoMake crash diagnostics on Windows the tiniest bit more useful
Reid Kleckner [Tue, 5 Aug 2014 20:49:12 +0000 (20:49 +0000)]
Make crash diagnostics on Windows the tiniest bit more useful

This escapes any backslashes in the executable path and fixes an issue
with a trailing quote when the main file name had to be quoted during
printing.

It's impossible to test this without putting backslashes or quotes into
the executable path, so I didn't add automated tests.

The crash diagnostics are still only useful if you're using bash on
Windows, though.  This should probably be writing a batch file instead.

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

10 years agoIntroduce f[no-]max-unknown-pointer-align=[number] option
Fariborz Jahanian [Tue, 5 Aug 2014 18:37:48 +0000 (18:37 +0000)]
Introduce f[no-]max-unknown-pointer-align=[number] option
to instruct the code generator to not enforce a higher alignment
than the given number (of bytes) when accessing memory via an opaque
pointer or reference. Patch reviewed by John McCall (with post-commit
review pending). rdar://16254558

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

10 years ago[Analyzer] fix for PR19102
Anton Yartsev [Tue, 5 Aug 2014 18:26:05 +0000 (18:26 +0000)]
[Analyzer] fix for PR19102

Newly-created unconsumed instance is now assumed escaped if an invoked constructor has an argument of a pointer-to-record type.

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

10 years agoAdded f and m flags to be ignored. These will not display a warning. The revision
Arthur Marble [Tue, 5 Aug 2014 18:21:20 +0000 (18:21 +0000)]
Added f and m flags to be ignored. These will not display a warning. The revision
for this patch is here: http://reviews.llvm.org/D4570. This will help with the
rebuild of Debian with clang. Here is a link to the errors that Debian is
experiencing: http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG

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

10 years agoAdded flags that should be ignored for compatibility. These flags will display
Arthur Marble [Tue, 5 Aug 2014 18:13:48 +0000 (18:13 +0000)]
Added flags that should be ignored for compatibility. These flags will display
a warning. Revision for this patch is here: http://reviews.llvm.org/D4565. This
patch will help with the rebuild of Debian with clang and many other projects
that wish to use clang. Here is a link to the errors that Debian is experiencing:
http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG

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

10 years ago[PR19983] SBPO_Always not covering all the cases.
Chad Rosier [Tue, 5 Aug 2014 17:58:54 +0000 (17:58 +0000)]
[PR19983] SBPO_Always not covering all the cases.
Patch by "Roman Kashitsyn" <romankashicin@gmail.com>.
Phabricator revision: http://reviews.llvm.org/D4788

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

10 years ago[AVX512] Add intrinsic for valignd/q
Adam Nemet [Tue, 5 Aug 2014 17:28:23 +0000 (17:28 +0000)]
[AVX512] Add intrinsic for valignd/q

Note that similar to palingr, we could further optimize these to emit
shufflevector when the shift count is <=64.  This however does not
change the overall design that unlike palignr we would still need the LLVM
intrinsic corresponding to this intruction to handle the >64 cases.  (palignr
uses the psrldq intrinsic in this case.)

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

10 years agoReleaseNotes: try to fix links
Hans Wennborg [Tue, 5 Aug 2014 17:19:14 +0000 (17:19 +0000)]
ReleaseNotes: try to fix links

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

10 years agoReleaseNotes: mention basic debug info and ASan support in the Windows blurb
Hans Wennborg [Tue, 5 Aug 2014 17:15:00 +0000 (17:15 +0000)]
ReleaseNotes: mention basic debug info and ASan support in the Windows blurb

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

10 years agoASTMatchersTests/matchesConditionallyWithCuda: Add -fno-ms-extensions, and get rid...
NAKAMURA Takumi [Tue, 5 Aug 2014 15:54:43 +0000 (15:54 +0000)]
ASTMatchersTests/matchesConditionallyWithCuda: Add -fno-ms-extensions, and get rid of initializer list.

I am not sure whether -xcuda might imply -fno-ms-extensions.

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

10 years agoASTMatchers.h: Fix an annotation. [-Wdocumentation-html]
NAKAMURA Takumi [Tue, 5 Aug 2014 15:01:31 +0000 (15:01 +0000)]
ASTMatchers.h: Fix an annotation. [-Wdocumentation-html]

Angle brackets, aka &lt; &gt;, should be escaped.

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

10 years ago[CMake] clangCodeGen: Update libdeps to add clangLex for PPChainedCallbacks.
NAKAMURA Takumi [Tue, 5 Aug 2014 15:01:12 +0000 (15:01 +0000)]
[CMake] clangCodeGen: Update libdeps to add clangLex for PPChainedCallbacks.

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

10 years agoclang-format: Add option to always break after a function's return type.
Daniel Jasper [Tue, 5 Aug 2014 12:16:31 +0000 (12:16 +0000)]
clang-format: Add option to always break after a function's return type.

This is required for GNU coding style, among others.

Also update the configuration documentation.

Modified from an original patch by Jarkko Hietaniemi, thank you!

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