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

17 Коммитов

Автор SHA1 Сообщение Дата
Chandler Carruth f8c247d247 Move all of the logic for __DEPRECATED to the driver based on comments
from dgregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130066 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 19:48:40 +00:00
Chandler Carruth 1cfe3c305c Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. This
matches GCC behavior which libstdc++ uses to limit #warning-based
messages about deprecation.

The machinery involves threading this through a new '-fdeprecated-macro'
flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We
turn the flag off in the driver when the warning is turned off (modulo
matching some GCC bugs). We record this as a language option, and key
the preprocessor on the option when introducing the define.

A separate flag rather than a '-D' flag allows us to properly represent
the difference between C and C++ builds (only C++ receives the define),
and it allows the specific behavior of following -Wdeprecated without
potentially impacting the set of user-provided macro flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130055 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 09:27:53 +00:00
Chandler Carruth 50465d1d2f There were some frustrating problems with the implementation of
-Wwrite-strings. First and foremost, once the positive form of the flag
was passed, it could never be disabled by passing -Wno-write-strings.
Also, the diagnostic engine couldn't in turn use -Wwrite-strings to
control diagnostics (as GCC does) because it was essentially hijacked to
drive the language semantics.

Fix this by giving CC1 a clean '-fconst-strings' flag to enable
const-qualified strings in C and ObjC compilations. Corresponding
'-fno-const-strings' is also added. Then the driver is taught to
introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings'
dominates.

This entire flag is basically GCC-bug-compatibility driven, so we also
match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm
open to changing this though as it seems insane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130051 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 06:30:43 +00:00
Argyrios Kyrtzidis 9a2b9d794b Implement -fshort-enums (rdar://8490496).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 00:25:19 +00:00
Chandler Carruth c304ba341a Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-22 02:21:53 +00:00
Dan Gohman c31176d5eb Use -fno-math-errno by default, and remove the IsMathErrnoDefault
targethook, which is no longer being used. This fixes PR5971.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92987 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 02:20:44 +00:00
Daniel Dunbar 80737ad5e0 Update tests to use %clang instead of 'clang', and forcibly disable use of '
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 22:01:24 +00:00
Daniel Dunbar 288294f187 Tests: Fix some bugs in clang_f_opts, options were out of order but it worked
because it had two inputs, except on Win32 where /dev/null doesn't exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-13 02:00:23 +00:00
Ted Kremenek 5099b80088 Convert the remainder of this test case over to using FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-12 00:42:52 +00:00
Ted Kremenek 6feaf57b46 Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-12 00:38:18 +00:00
Daniel Dunbar 53e8484581 Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm:🆑:init(true) arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 04:55:23 +00:00
Daniel Dunbar 9e5cc6b703 Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
instead of using getDefaultLangOptions.
 - Remove unused -fobjc-tight-layout while at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 08:07:36 +00:00
Daniel Dunbar 2475d76920 Remove RUN: true lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 01:47:25 +00:00
Daniel Dunbar 4fcfde4d5c Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 01:45:36 +00:00
John Thompson a6fda124bf Adding -fshort-wchar option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 20:14:16 +00:00
Daniel Dunbar 75eb1d6478 PR4016: Forward -fno-show-source-location to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-08 21:13:54 +00:00
Daniel Dunbar 82d0068852 Driver: Fix forwarding of -fpascal-strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68570 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 23:51:44 +00:00