diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2014-01-15 06:34:12 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2014-01-15 06:34:12 +0000 |
| commit | b9737cd0bcac6e5ed65c169e595834a20bf6297d (patch) | |
| tree | 56742581601ae50f260cbba3ab64edafd4ecde3e /clang | |
| parent | 30a134b68dcd217523c587509d8752aea4685caa (diff) | |
| download | bcm5719-llvm-b9737cd0bcac6e5ed65c169e595834a20bf6297d.tar.gz bcm5719-llvm-b9737cd0bcac6e5ed65c169e595834a20bf6297d.zip | |
Fix the attribute enable_if example in the docs to be 100% real-world, instead of merely being close to the real world to mislead people. This now matches the test.
llvm-svn: 199298
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/docs/LanguageExtensions.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index 24ef8550c93..b6933838f07 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -1410,9 +1410,11 @@ available in C. .. code-block:: c++ - int isdigit(int c) __attribute__((enable_if(c >= -1 && c <= 255, "'c' must have the value of an unsigned char or EOF"))); + int isdigit(int c); + int isdigit(int c) __attribute__((enable_if(c <= -1 && c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF"))); void foo(char c) { + isdigit(c); isdigit(10); isdigit(-10); // results in a compile-time error. } |

