koldaniel marked an inline comment as done.
koldaniel added inline comments.


================
Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8
+
+`extern` is redundant in function declarations
+
----------------
alexfh wrote:
> xazax.hun wrote:
> > alexfh wrote:
> > > Could you explain, why you think `extern` is redundant in function 
> > > declarations?
> > Just to be clear here, do you think there is a case where extern is not 
> > redundant or you just want the documentation to be extended? 
> Sorry for being unclear. I would expect a more in-depth explanation of why 
> the keyword is redundant with references to the appropriate sections of the 
> standard or some other authoritative source.
https://en.cppreference.com/w/cpp/language/language_linkage

The default language linkage is C++, so without any additional parameters it is 
redundant (**extern "C++"** can also be redundant, but it depends on the 
context). In C context (**extern "C"**) the situation is the same, **extern** 
keyword is redundant for function declarations 
(http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf - 6.2.2.5) 


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D33841/new/

https://reviews.llvm.org/D33841



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to