diff --git a/clang/docs/ClangCommandLineReference.rst b/clang/docs/ClangCommandLineReference.rst --- a/clang/docs/ClangCommandLineReference.rst +++ b/clang/docs/ClangCommandLineReference.rst @@ -1016,7 +1016,12 @@ .. option:: -I, --include-directory , --include-directory= -Add directory to include search path. If there are multiple -I options, these directories are searched in the order they are given before the standard system directories are searched. If the same directory is in the SYSTEM include search paths, for example if also specified with -isystem, the -I option will be ignored +Add directory to include search path. For C++ input, if +there are multiple -I options, these directories are searched +in the order they are given before the standard system directories +are searched. If the same directory is in the SYSTEM include search +paths, for example if also specified with -isystem, the -I option +will be ignored .. option:: -I-, --include-barrier diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -651,12 +651,13 @@ "remove current directory from include path">; def I : JoinedOrSeparate<["-"], "I">, Group, Flags<[CC1Option,CC1AsOption]>, MetaVarName<"">, - HelpText<"Add directory to include search path. If there are multiple -I " - "options, these directories are searched in the order they are " - "given before the standard system directories are searched. " - "If the same directory is in the SYSTEM include search paths, for " - "example if also specified with -isystem, the -I option will be " - "ignored">; + HelpText<"Add directory to the end of the list of include search paths">, + DocBrief<[{Add directory to include search path. For C++ inputs, if +there are multiple -I options, these directories are searched +in the order they are given before the standard system directories +are searched. If the same directory is in the SYSTEM include search +paths, for example if also specified with -isystem, the -I option +will be ignored}]>; def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group, MetaVarName<"">, HelpText<"Add directory to library search path">; def MD : Flag<["-"], "MD">, Group,