[all-commits] [llvm/llvm-project] a1a14e: [Clang] Avoid misleading 'conflicting types' diagn...
Cyndy Ishida via All-commits
all-commits at lists.llvm.org
Tue May 24 08:46:42 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a1a14e817eeb5a0663b1342a125674348b8aac06
https://github.com/llvm/llvm-project/commit/a1a14e817eeb5a0663b1342a125674348b8aac06
Author: Cyndy Ishida <cyndy_ishida at apple.com>
Date: 2022-05-24 (Tue, 24 May 2022)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
M clang/test/Sema/prototype-redecls.c
Log Message:
-----------
[Clang] Avoid misleading 'conflicting types' diagnostic with no-prototype decls.
Clang has recently started diagnosing prototype redeclaration errors like [rG385e7df33046](https://reviews.llvm.org/rG385e7df33046d7292612ee1e3ac00a59d8bc0441)
This flagged legitimate issues in a codebase but was confusing to resolve because it actually conflicted with a function declaration from a system header and not from the one emitted with "note: ".
This patch updates the error handling to use the canonical declaration's source location instead to avoid misleading errors like the one described.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D126258
More information about the All-commits
mailing list