Граф коммитов

40142 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 36a16498ff Teach the preprocessor to hold onto the preprocessor options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166599 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 17:46:57 +00:00
Chad Rosier 42242552fe [ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166594 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 17:23:06 +00:00
Douglas Gregor 14e71f0413 Move PreprocessorOptions into the Lex library, and make it intrusively
reference-counted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166587 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 17:01:35 +00:00
Douglas Gregor bbf38319ed (De-)serialize header search options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166586 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 16:50:34 +00:00
Douglas Gregor b0985c86f7 Update unit tests for HeaderSearch change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166584 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 16:24:38 +00:00
Douglas Gregor c042edd54f Move HeaderSearchOptions into the Lex library, make it intrusively
reference-counted, and hold a reference to it in HeaderSearch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166583 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 16:19:39 +00:00
Douglas Gregor 04d25fcb26 Undef SEMANTIC_VALUE_DIAGOPT appropriately
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166579 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 15:53:39 +00:00
Douglas Gregor 1b2c3c0884 (De-)serialize the file system options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166577 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 15:49:58 +00:00
Douglas Gregor 5f3d8224af Serialize DiagnosticOptions to the AST file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166572 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 15:17:15 +00:00
Mahesha S 6e347bccd1 Removed an extra blank line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166571 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 15:12:40 +00:00
Manuel Klimek 3e2aa99e99 Adds the possibility to run ASTMatchFinder over arbitrary AST nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166567 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 14:47:44 +00:00
Douglas Gregor 403f2c6804 Add a simple test involving decltype on Objective-C properties and ivars
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166562 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 14:13:21 +00:00
Douglas Gregor aafd111afa Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166561 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 14:11:55 +00:00
Evgeniy Stepanov 19baf068e8 Pass LLVM_ANDROID_TOOLCHAIN_DIR if set.
This lets one build ASan runtime for ARM/Android by running
make -C tools/clang/runtime/ \
  LLVM_ANDROID_TOOLCHAIN_DIR=/path/to/ndk/toolchain
in an existing build tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166560 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 14:05:29 +00:00
Alexey Samsonov 5c51fc4ad9 Update docs about TSan availability in CMake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166558 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 13:34:53 +00:00
Alexey Samsonov adea51733c Fix some wordings in AddressSanitizer docs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166557 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 13:21:51 +00:00
Ulrich Weigand 923099773f A number of test cases assume that an "int" parameter or return value
will be represented in the IR as a plain "i32" type.  This causes the
tests to spuriously fail on platforms where int is not a 32-bit type,
or where the ABI requires attributes like "signext" or "zeroext" to
be used.

This patch adds -triple or -target parameters to force those tests
to use the i386-unknown-unknown target.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166551 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 12:22:56 +00:00
NAKAMURA Takumi 04631c303a Revert r166541, "clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532."
According to r166543, it is not needed for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166544 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 03:59:09 +00:00
Nadav Rotem 129369dae8 Clang now attempts to create a TargetMachine whenever a triple is given.
Many of our tests specify triples that are not built into clang.
In this commit we allow clang to fail loading the triple if we are only
using clang to emit llvm ir.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166543 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 03:52:31 +00:00
NAKAMURA Takumi 045d707f2d clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166541 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 02:57:57 +00:00
Nico Weber c89fd3af0e Add a test for -Warc-abi as requested by Fariborz.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166540 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 02:37:03 +00:00
Rafael Espindola e4aeeaae8e Add padding inreg registers to cause llvm to skip ecx when needed with
the x86_fastcallcc calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166538 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 01:59:00 +00:00
Rafael Espindola b693269223 Add inreg markers with the x86_fastcallcc calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166537 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 01:58:58 +00:00
Matt Beaumont-Gay 6d919fb67b Address feedback from Eli Friedman on r166522.
In particular, we do want to warn on some unused cast subexpressions within
macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166534 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 01:14:28 +00:00
Nadav Rotem fa60be0281 Change EmitAssemblyHelper to create the target machine early
and use it to initialize the TargetTransformInfo analysis pass.
We need the TTI information for the loop vectorizer.

rdar://12464901



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166532 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 00:53:38 +00:00
Jordan Rose 603513d229 [analyzer] Handle 'SomeVar.SomeEnumConstant', which is legal in C++.
This caused assertion failures analyzing LLVM.

<rdar://problem/12560282>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166529 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 23:59:08 +00:00
Jordan Rose 4d9e497a2b [analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.
After every 1000 CFGElements processed, the ExplodedGraph trims out nodes
that satisfy a number of criteria for being "boring" (single predecessor,
single successor, and more). Rather than controlling this with a cc1 option,
which can only disable this behavior, we now have an analyzer-config option,
'graph-trim-interval', which can change this interval from 1000 to something
else. Setting the value to 0 disables reclamation.

The next commit relies on this behavior to actually test anything.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166528 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 23:59:05 +00:00
Chad Rosier e72faf6148 [ms-inline asm] Test case for r166526.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166527 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 23:42:25 +00:00
Chad Rosier 82573e357f [ms-inline asm] Update the triple to test r166523.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166524 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 23:32:21 +00:00
Matt Beaumont-Gay c7db84d014 Don't emit -Wunused-value warnings from macro expansions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166522 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 23:19:32 +00:00
Douglas Gregor f27762b1be Tweak include order
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166521 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 23:13:50 +00:00
Douglas Gregor dc7b641574 Use a .def file for most of the diagnostic options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166520 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 23:11:23 +00:00
Fariborz Jahanian 6a6bb2810c Objective-C: check that when a category method is being implemented,
method type in cateogry matches the implementation.
// rdar://12519216


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166518 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 23:06:22 +00:00
Douglas Gregor 99eb4a7920 Buildbot debugging is fun
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166516 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 22:55:10 +00:00
Douglas Gregor 16a4abf5d9 One last unit-test fix
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166513 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 22:43:37 +00:00
Douglas Gregor 3aeb34f563 More unit-test fixes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166511 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 22:38:58 +00:00
Douglas Gregor 35d516cf1a Update clang-interpreter example
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166510 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 22:36:49 +00:00
Douglas Gregor 8e02361163 Fixup unit tests for DiagnosticOptions change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166509 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 22:31:51 +00:00
Douglas Gregor 02c23ebf41 Make DiagnosticOptions intrusively reference-counted, and make sure
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 22:26:28 +00:00
Jordan Rose 340d0d3001 CMake: Fix public header search for generating Xcode/MSVC projects.
Previously, we only had support for one level of library under lib/,
with the existence of the two-level lib/StaticAnalyzer/* hardcoded in
the top-level CMakeLists.txt. This became a problem with split of
libRewrite into several libraries -- with the same sub-names as the
libraries in lib/StaticAnalyzer/.

Now, we match up anything under lib/ to the corresponding directory
in include/clang/.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166505 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 21:54:03 +00:00
Eli Friedman a7a38cb64e Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166500 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 20:26:57 +00:00
Eli Friedman 2e2d03c702 Delete junk that snuck into r166498.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166499 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 20:23:23 +00:00
Eli Friedman e4851f26eb Add a new warning -Wmissing-variable-declarations, to warn about variables
defined without a previous declaration.  This is similar to
-Wmissing-prototypes, but for variables instead of functions.

Patch by Ed Schouten.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166498 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 20:19:32 +00:00
Douglas Gregor 4cdad3151b Switch CodeGenOptions over to a .def file, like we do with LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166497 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 20:05:01 +00:00
Richard Smith 713c287caf When rebuilding a DependentScopeDeclRefExpr, perform a lookup into the scope
even if it's dependent, in case it now names a member of the current instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166496 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 19:56:01 +00:00
Chad Rosier 4d5dd7c954 [ms-inline asm] Update for r166433.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166489 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 17:44:40 +00:00
Rafael Espindola 3667bbe0f2 Handle -pthread, -pg and -shared correctly on bitrig.
Patch by David Hill.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166483 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 17:07:31 +00:00
Sean Silva ab4826835f Fix some mdoc nits
Patch by Eitan Adler!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166482 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 16:35:44 +00:00
Daniel Jasper c711af2ddb Make hasDeclaration() matcher work inside the memberExpr() matcher.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166479 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 15:46:39 +00:00
NAKAMURA Takumi ac2153e518 clang/test/PCH/pch-dir.c: Update a comment for msvc. msvc(*-win32) implies -std=c++11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166478 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 10:43:00 +00:00