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

11 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru f3477c13ee Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164769 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-27 10:16:10 +00:00
Sylvestre Ledru 94ff8e1f57 Fix a typo 'iff' => 'if'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164766 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-27 09:57:10 +00:00
Richard Smith b3440f5898 all-std-headers.cpp: Include the C++11 headers when building with clang
in -std=gnu++11 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154654 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-13 03:39:16 +00:00
Richard Smith 5a5a971908 For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this is
a type specifier and can be combined with unsigned. This allows libstdc++4.7 to
be used with clang in c++98 mode.

Several other changes are still required for libstdc++4.7 to work with clang in
c++11 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153999 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-04 06:24:32 +00:00
Richard Smith 69f811d268 Extend all-std-headers.cpp to include C++11 headers when building in C++11 mode.
Conditionally include headers which older STL implementations don't provide.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150526 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 23:06:14 +00:00
Chandler Carruth c8cfc74bdc Enhance the CFG construction to detect no-return destructors for
temporary objects and local variables. When detected, these split the
block, marking the new one as having only the exit block as a successor.
This prevents a large number of false positives in warnings sensitive to
no-return constructs such as -Wreturn-type, and fixes the remainder of
PR10063 along with several variations of this bug that had not been
reported. The test cases are extended across the board to cover these
patterns.

This also checks in a stress test for these types of CFGs. The stress
test declares some 32k variables, a mixture of no-return and normal
destructors. Previously, this resulted in roughly 2500 CFG blocks, but
didn't model any of the no-return destructors. With this patch, it
results in over 33k blocks, many of them now unreachable.

The nice thing about how the analyzer is set up? This causes *no*
regression in performance of building the CFG. It actually in some cases
makes it faster, as best I can benchmark. The analysis for -Wreturn-type
(and any other that cares about no-return code paths) is technically
slower now as it has to look at many more candidate blocks, but it
computes the correct answer. I have more test cases to follow, I think
they all work now. Also I have further work that should dramatically
simplify analyses in the presence of no-return.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139586 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 06:09:01 +00:00
Chandler Carruth fd8bcd2520 Add several CFG-stress-testing input source files. These use the
preprocessor to build up very large CFGs in various shapes that can
produce different algorithmic behavior in CFG-walking code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134698 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 11:20:51 +00:00
Douglas Gregor 69cff4e5de Add an input file that includes all standard C++ headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 03:26:11 +00:00
Chris Lattner 91f1dc4f94 added to wrong directory
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-26 04:36:31 +00:00
Chris Lattner a84538ea2b add an evil macro expansion perf test from Neil.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40138 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-21 04:54:14 +00:00
Reid Spencer 5f016e2cb5 Stage two of getting CFE top correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 17:01:13 +00:00