This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG217f0f735afe: [Clang][Sema] Implement GCC
-Wcast-function-type (authored by ychen).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST
ychen updated this revision to Diff 333162.
ychen added a comment.
- update doc to match diagnostics
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97831/new/
https://reviews.llvm.org/D97831
Files:
clang/docs/DiagnosticsReference.rst
ychen added a comment.
Thanks for the insightful suggestions. I'll definitely send a follow-up patch
for these (pointerLike arguments, TargetInfo refactoring, promotable integral
types).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97831/new/
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Looks good. Some possible improvements to make the diagnostic a bit more
precise, but I'd be happy if you want to address some of those as follow-ups
after this change.
ychen added inline comments.
Comment at: clang/lib/Sema/SemaCast.cpp:1044-1048
+ // Allow integral type mismatch if their size are equal.
+ if (SrcType->isIntegralType(Context) && DestType->isIntegralType(Context))
+if (Context.getTypeInfoInChars(SrcType).Width ==
+
ychen updated this revision to Diff 332840.
ychen marked 3 inline comments as done.
ychen added a comment.
- Add code/tests for `function -> function pointer` and `block pointer ->
function pointer`.
- Use Context.hasSameUnqualifiedType
- Style
Repository:
rG LLVM Github Monorepo
CHANGES
rsmith added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8368
+def warn_cast_function_type : Warning<
+ "cast between incompatible function types from %0 to %1">,
+ InGroup, DefaultIgnore;
I'd find something like "cast from
ychen added a comment.
ping
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97831/new/
https://reviews.llvm.org/D97831
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ychen updated this revision to Diff 332384.
ychen added a comment.
- update
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97831/new/
https://reviews.llvm.org/D97831
Files:
clang/docs/DiagnosticsReference.rst
ychen added a comment.
ping.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97831/new/
https://reviews.llvm.org/D97831
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ychen added a comment.
ping?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97831/new/
https://reviews.llvm.org/D97831
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ychen created this revision.
ychen added reviewers: aaron.ballman, rsmith.
ychen requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Warn when a function pointer is cast to an incompatible function
pointer. In a cast involving function
12 matches
Mail list logo