xbolva00 updated this revision to Diff 167985.
xbolva00 added a comment.
- Addressed review comments
https://reviews.llvm.org/D52791
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaStmt.cpp
test/Sema/misleading-pointer-decl.c
Index: test/Sema/misleading-pointer-decl.c
===
erik.pilkington added a comment.
Thanks for working on this!
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:318-320
+def warn_misleading_var_type_decl : Warning<
+ "misleading variable declaration, supposed to be a pointer type instead ?">,
+ InGroup>;
---
xbolva00 updated this revision to Diff 167978.
xbolva00 added a comment.
- Avoid possible crash
https://reviews.llvm.org/D52791
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaStmt.cpp
test/Sema/misleading-var-type-decl.c
Index: test/Sema/misleading-var-type-decl.c
==
xbolva00 created this revision.
xbolva00 added a reviewer: rsmith.
Herald added a subscriber: cfe-commits.
void foo() {
char* a, b; // warn that b is not a pointer type as someone may expect
}
Fixes PR39150 (also I see a request for this checker on GCC Bugzilla)
Repository:
rC Clang
http