================
@@ -2806,10 +2806,29 @@ void Sema::clearDocumentationDiagsCache() {
DocDiagsExactComputed = 0;
}
+bool Sema::areDocumentationDiagsSourceLocationDependent() {
+ // Documentation diagnostics are not location-dependent, except if a
+ // (location-dependent) warning suppression mapping is active.
+ if (!DocDiagsInSuppressionMapping) {
----------------
zmodem wrote:
nit: I find it more natural to put the in-cache path first (that will save an
indentation level later too):
```
if (DocDiagsInSuppressionMapping)
return *DocDiagsInSuppressionMapping;
...
return DocDiagsInSuppressionMapping = ...;
```
but maybe that's just a personal preference.
https://github.com/llvm/llvm-project/pull/244714
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits