[clang] 44b391f - LanguageExtensions.rst: fix a typo in the `#pragma clang deprecated` example

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 24 12:41:54 PST 2023


Author: Fangrui Song
Date: 2023-02-24T12:41:49-08:00
New Revision: 44b391fc473c3ea8ce5d6cefeac6c781060b398f

URL: https://github.com/llvm/llvm-project/commit/44b391fc473c3ea8ce5d6cefeac6c781060b398f
DIFF: https://github.com/llvm/llvm-project/commit/44b391fc473c3ea8ce5d6cefeac6c781060b398f.diff

LOG: LanguageExtensions.rst: fix a typo in the `#pragma clang deprecated` example

Added: 
    

Modified: 
    clang/docs/LanguageExtensions.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 2d1b8af40bbb..2595b5de8f26 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -4665,7 +4665,7 @@ provide deprecation warnings for macro uses. For example:
    #define MIN(x, y) x < y ? x : y
    #pragma clang deprecated(MIN, "use std::min instead")
 
-   void min(int a, int b) {
+   int min(int a, int b) {
      return MIN(a, b); // warning: MIN is deprecated: use std::min instead
    }
 


        


More information about the cfe-commits mailing list