Issue 165230
Summary [clang][enhancement] namespace control for -Werror=deprecated-declarations
Labels clang
Assignees
Reporter avikivity
    The [[deprecated("reason")]] allows a library author to deprecate names it exports.

-Wdeprecated-declarations allows a library author to tolerate deprecated declarations it imports.

-Werror=deprecated-declarations allows a library author to assert that the library does not use its own deprecated names, except that it conflicts with =Wdeprecated-declarations for imported names.

A library author would like fine-grained control over which namespaces cause a warning, and which cause an error. This would allow the compiler that the library does not use its own deprecated symbols, but still tolerates deprecated symbols from the environment, over which it has no control. Where the library uses its own symbols intentionally (for example, in tests), the author would sprinkle pragmas to suppress these errors.

Possible syntax: -Werror=deprecated-declarations-namespace-n1-n2 to error for deprecated symbols from namespace n1::n2.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to