Commit Graph

7 Commits

Author SHA1 Message Date
Reid Kleckner 0b009e8269 Extend -Wcast-calling-convention to warn on declarations as well as definitions
My original warning was very conservative and I never revisited the
heuristics that were used.

This would have caught http://crbug.com/687251 at compile time.

llvm-svn: 293677
2017-01-31 19:37:45 +00:00
Reid Kleckner a6fd865393 Fix line numbers in calling convention test
llvm-svn: 269787
2016-05-17 17:33:31 +00:00
Reid Kleckner a73dcbcd13 Fix calling convention test
llvm-svn: 269781
2016-05-17 16:54:40 +00:00
Reid Kleckner 43be52a59f Relax -Wcalling-convention-cast when casting to the default convention (cdecl)
llvm-svn: 269214
2016-05-11 17:43:13 +00:00
Hans Wennborg 68e3aa7f30 Disable -Wcast-calling-convention by default (follow-up to r269116)
llvm-svn: 269148
2016-05-11 00:49:20 +00:00
Reid Kleckner 0ff6e1bc26 Wildcard away paths in fixit CHECKs in my last testcase
Oops. :(

llvm-svn: 269118
2016-05-10 21:10:25 +00:00
Reid Kleckner 9f49733c65 Add -Wcast-calling-convention to warn when casting away calling conventions
Summary:
This only warns on casts of the address of a function defined in the
current TU. In this case, the fix is likely to be local and the warning
useful.

Here are some things we could experiment with in the future:
- Fire on declarations as well as definitions
- Limit the warning to non-void function prototypes
- Limit the warning to mismatches of caller and callee cleanup CCs

This warning is currently off by default while we study its usefulness.

Reviewers: thakis, rtrieu

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D17348

llvm-svn: 269116
2016-05-10 21:00:03 +00:00