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

41972 Коммитов

Автор SHA1 Сообщение Дата
Daniel Dunbar a5b8e19fc3 Remove empty directories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173492 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 21:15:32 +00:00
Daniel Dunbar cd856aee39 [utils] Remove the OptionalTests subdir no one runs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173491 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 21:12:20 +00:00
Daniel Dunbar 7771467598 [utils] Remove C++Tests that I don't think anyone uses anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173490 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 21:12:17 +00:00
Alexander Kornienko c6dcea93b4 Silence unintended fallthrough diagnostic on a case label preceded with a normal label.
Summary:
It's unlikely that a fallthrough is unintended in the following code:
switch (n) {
...
  label:
  case 1:
...
    goto label;
...
}

Reviewers: rsmith, doug.gregor

Reviewed By: doug.gregor

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173486 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 20:44:56 +00:00
Dmitri Gribenko f282e72d4d FileCheck'ize tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173484 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 20:34:08 +00:00
Dmitri Gribenko 8b127d3f9b Migrate tests to -verify and merge them
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173482 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 20:33:53 +00:00
Daniel Dunbar 7f5c343c43 [tests] Force a triple to ensure /usr/include is one of the entries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173469 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 18:50:18 +00:00
Daniel Dunbar fd426dc25d [tests] Add a test for -iwithprefix.
- This just scratches the surface, We have pretty horrible test coverage in
   this area it seems like, but this at least covers the change in r173410.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 18:08:53 +00:00
Fariborz Jahanian 909df54cc3 Add space after ';'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173462 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 17:47:49 +00:00
Fariborz Jahanian 78c28be687 Improve diagnsotic further on integer overflow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 17:19:07 +00:00
Alexander Kornienko e992ed1a06 Don't suggest to insert [[clang::fallthrough]] before empty cases. Fix for multiple case labels.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173458 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 15:49:34 +00:00
Daniel Jasper 3499ddac3f Fix some alignment and line break decisions.
This combines two small changes:
1) Put a penalty on breaking after "<"
2) Only produce a hanging indent when parameters are separated by
commas.

Before:
aaaaaaaaaaaaaaaaaaaaaaaa<
    aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa>(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
aaaaaa(new Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
               aaaaaaaaaaaaaaaaaaaaaaaaaaaaa));

After:
aaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa>(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
aaaaaa(new Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaa));

This changes one ObjC test, but AFAICT this is not according to any
style guide (neither before nor after). We probably should be aligning
on the ":" there according to:
http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml?showone=Method_Invocations#Method_Invocations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173457 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 15:43:32 +00:00
NAKAMURA Takumi b6c08a6414 Lexer.cpp: Fix a warning with ptrdiff_t on i686. [-Wsign-compare]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 14:57:21 +00:00
NAKAMURA Takumi 7d56bfe37d clang/test/PCH/modified-header-error.c: Disable it again. It had been problematic on win32 for while.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173439 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 11:07:42 +00:00
Daniel Jasper 63f0036444 Allow breaking after "::" if absolutely necessary.
Otherwise, really long nested name specifiers can easily lead to a
violation of the column limit.

Not sure about the rules for indentation in those cases, so input is
appreciated (see tests.).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173438 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 10:57:27 +00:00
NAKAMURA Takumi ae04222bc5 ConvertUTF.h: Suppress a warning with ptrdiff_t on i686. [-Wsign-compare]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173436 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 10:01:35 +00:00
NAKAMURA Takumi 643728a4f1 clang/test/Driver/output-file-cleanup.c: Add arm and powerpc to XFAIL.
..."ppc" was not recognized here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 09:43:17 +00:00
Nick Lewycky de72f10593 Add missing InGroup for this warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173429 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 07:31:12 +00:00
NAKAMURA Takumi d7e87b251c clang/test/Driver/output-file-cleanup.c: Mark it as XFAIL:*-mingw32, ppc, for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173428 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 06:56:45 +00:00
NAKAMURA Takumi dddcc57fe7 clang/test/Index/crash-recovery-*.c: Drop 'REQUIRES:shell". "test !" is available on Lit win32 since r173421.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173422 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 06:31:02 +00:00
NAKAMURA Takumi a6cd5cd98b clang/test: Drop "REQUIRES:shell" in three tests. They can run on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173419 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 06:02:11 +00:00
NAKAMURA Takumi e095c654b0 clang/test/CodeGenCXX/debug-info-static-member.cpp: Appease targetting msvc to add explicit -target x86_64-unknown-unknown.
with -target i686-win32, you will see;

debug-info-static-member.cpp:11:22: error: in-class initializer for static data member of type 'const float' requires 'constexpr' specifier [-Wstatic-float-init]
  const static float const_b = 3.14;
                     ^         ~~~~
  constexpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173418 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 05:58:53 +00:00
NAKAMURA Takumi 33eb9b54b0 Create clang/test/Driver/lit.local.cfg.
These files had been ignored.

  - clang_f_opts.h
  - debug-comp-dir.S
  - debug-main-file.S

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173416 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 05:09:37 +00:00
Richard Smith b4b1d69f19 Sync 'in class initialization of static const double' extension up with GCC,
and split it out of -Wgnu into its own warning flag.

 * In C++11, this is now a hard error (GCC has no extension here in C++11 mode).
   The error can be disabled with -Wno-static-float-init, and has a fixit to
   add 'constexpr'.

 * In C++98, this is still an ExtWarn, but is now controlled by
   -Wstatic-float-init as well as -Wgnu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173414 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 04:22:16 +00:00
Daniel Dunbar eab6652b7e [Frontend] Remove another IsUserSpecified member variable that is now unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173412 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 01:50:47 +00:00
Daniel Dunbar 5c4e34c167 [Frontend] Drop the isUserSupplied argument to InitHeaderSearch, it is unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173411 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 01:50:39 +00:00
Daniel Dunbar f3fc21f727 [Frontend] The -iwithprefix option belongs in the After category, according to
GCC docs.
 - Found by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173410 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 01:50:34 +00:00
Daniel Dunbar 1ea6bc0fd9 [Lex] Remove DirectoryLookup.UserSpecified, which is unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173409 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 01:50:28 +00:00
NAKAMURA Takumi 1d32133b44 Serialization/GlobalModuleIndex.cpp: Fixup r173405, <cstdio>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173408 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 01:47:07 +00:00
Douglas Gregor 1a49d97d76 Implement the reader of the global module index and wire it into the
AST reader.

The global module index tracks all of the identifiers known to a set
of module files. Lookup of those identifiers looks first in the global
module index, which returns the set of module files in which that
identifier can be found. The AST reader only needs to look into those
module files and any module files not known to the global index (e.g.,
because they were (re)built after the global index), reducing the
number of on-disk hash tables to visit. For an example source I'm
looking at, we go from 237844 total identifier lookups into on-disk
hash tables down to 126817.

Unfortunately, this does not translate into a performance advantage.
At best, it's a wash once the global module index has been built, but
that's ignore the cost of building the global module index (which
is itself fairly large). Profiles show that the global module index
code is far less efficient than it should be; optimizing it might give
enough of an advantage to justify its continued inclusion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173405 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 01:03:03 +00:00
Douglas Gregor f575d6e7c3 Rename the -cc1 option "-generate-module-index" to
"-fmodules-global-index" and expand its behavior to include both the
use and generation of the global module index.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173404 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 00:45:27 +00:00
Douglas Gregor e169807aae Track the number of lookups and hits into the on-disk hash tables for
identifiers within the AST file reader.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173403 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 00:38:33 +00:00
Jordan Rose ae82c2b7b6 Clarify comment: "diagnose" is better than "warn" when emitting an error.
Thanks, Dmitri.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173400 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 00:20:28 +00:00
Richard Smith d4497dde6f Clean up: since we have FunctionDecl::IsInline, make it store the right value
for template instantiations, and use it to simplify the implementation of
FunctionDecl::isInlined().

This incidentally changes the result of isInlined on a declared-but-not-defined
non-inline member function from true to false. This is sort of a bug fix, but
currently isInlined is only called on function definitions, so it has no visible
effects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173397 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 00:08:28 +00:00
Dmitri Gribenko 57e2a1662e FileCheck'ize test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173396 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 00:06:54 +00:00
Dmitri Gribenko 5c9e20fed2 FileCheck'ize test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173393 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:44:04 +00:00
Anna Zaks b8ccd43dbf [analyzer] Fixup for r173385 and r173386 - initialize the members.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173392 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:40:17 +00:00
Dmitri Gribenko 057519de2f FileCheck'ize test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173391 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:34:51 +00:00
Dmitri Gribenko 45f1fa9ef2 FileCheck'ize test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173389 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:29:37 +00:00
Fariborz Jahanian a7972a08e0 Fixes text of diagnostics in integer overflow patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173388 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:24:32 +00:00
Dmitri Gribenko 0a04cbd98f FileCheck'ize test/SemaCXX/qualified-names-print.cpp and merge it to other
-ast-print tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173387 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:21:11 +00:00
Anna Zaks d130140cb7 [analyzer] Add "-analyzer-config mode=[deep|shallow] ".
The idea is to introduce a higher level "user mode" option for
different use scenarios. For example, if one wants to run the analyzer
for a small project each time the code is built, they would use
the "shallow" mode. 

The user mode option will influence the default settings for the
lower-level analyzer options. For now, this just influences the ipa
modes, but we plan to find more optimal settings for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173386 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:15:34 +00:00
Anna Zaks bfa9ab8183 [analyzer] Replace "-analyzer-ipa" with "-analyzer-config ipa".
The idea is to eventually place all analyzer options under
"analyzer-config". In addition, this lays the ground for introduction of
a high-level analyzer mode option, which will influence the
default setting for IPAMode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173385 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:15:30 +00:00
Anna Zaks 73f0563009 [analyzer] refactor: access IPAMode through the accessor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173384 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:15:25 +00:00
Jordan Rose 33e9500784 scan-build: Add a --keep-empty option for better testing.
SATestBuild expects to compare output directories for each invocation of
scan-build that it runs, but scan-build clears out empty directories by
default. We were coincidentally not getting that behavior until r173294.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173383 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 23:07:59 +00:00
David Blaikie 75c12bf46d FileCheck-ify some debug info scope related tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173379 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 22:47:48 +00:00
Fariborz Jahanian 8f62847508 removed duplicated comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173378 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 22:26:55 +00:00
Fariborz Jahanian ad48a50059 Patch to check for integer overflow. It has been
commented on and approved by Richard Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 22:11:45 +00:00
Jordan Rose 6c23bd2890 Move 'convertUTF8Sequence' helper into the C++ section of the header file.
It's annotated as "inline", but ConvertUTF.c should still be able to compile
as C89.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173376 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 21:48:50 +00:00
Akira Hatanaka 4055cfc46a [mips] Do not emit i32 padding if target ABI is O32. This was causing backend
to pass floating point arguments to be passed in integer registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173375 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24 21:47:33 +00:00