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

8 Коммитов

Автор SHA1 Сообщение Дата
Nick Lewycky ba5f6eced2 Teach clang -fixit to modify files in-place, or -fixit=suffix to create new
files with the additional suffix in the middle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 01:30:46 +00:00
Douglas Gregor 1aae80b173 Thread a Scope pointer into BuildRecoveryCallExpr to help typo
correction find names when a call failed. Fixes
<rdar://problem/7853795>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:27:54 +00:00
Douglas Gregor 2eef829b19 When a declaration of a function is missing an exception specification
that was present in a prior declaration, emit a warning rather than a
hard error (which we did before, and still do with mismatched
exception specifications). Moreover, provide a fix-it hint with the
throw() clause that should be added, e.g.,

t.C:10:7: warning: 'operator new' is missing exception specification
      'throw(std::bad_alloc)'
void *operator new(unsigned long sz)
      ^
                                     throw(std::bad_alloc)

As part of this, disable the warning when we're missing an exception
specification on operator new, operator new[], operator delete, or
operator delete[] when exceptions are turned off (-fno-exceptions).

Fixes PR5957.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 07:14:45 +00:00
Douglas Gregor 28485232e4 Make this fix-it test case actually fail when there is a problem; add
a test for access declarations and remove a (broken) test for removal
of default arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:46:27 +00:00
Daniel Dunbar a5728872c7 Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:14:24 +00:00
Daniel Dunbar 73dd7686d6 Update FixIt tests to make it more obvious they use a separate mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88758 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 04:39:42 +00:00
Anders Carlsson ad26b7376b If a function with a default argument is redefined and the new function also has a defualt argument then add a fixit hint that removes the default argument. Fixes PR5444.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86659 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10 03:24:44 +00:00
Douglas Gregor dd6f4abe81 Move the fix-it tests into their own subdirectory
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 17:19:13 +00:00