[all-commits] [llvm/llvm-project] e3f87e: [C] Fix a false-positive with tentative defn compa...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Tue May 13 08:00:18 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e3f87e15910a5f1c5552fc3ef57e7dda3f68901a
https://github.com/llvm/llvm-project/commit/e3f87e15910a5f1c5552fc3ef57e7dda3f68901a
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2025-05-13 (Tue, 13 May 2025)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
M clang/test/Sema/warn-tentative-defn-compat.c
Log Message:
-----------
[C] Fix a false-positive with tentative defn compat (#139738)
C++ has a carve-out that makes a declaration with 'extern' explicitly
specified and no initializer be a declaration rather than a definition.
We now account for that to silence a diagnostic with:
```
extern const int i;
const int i = 12;
```
which is valid C++.
Addresses an issue that was brought up via post-commit review.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list